A force is created along the length of the vector from the position of the particles towards the surface of the object.
—————————–
Wrangle:
vector pos = minpos(1,@P);
vector dir = @P – pos;
//v@N = dir;
float len = length(dir);
//f@len = len;
len = fit(len,chf(“Old_Min”),chf(“Old_Max”),chf(“New_Min”),chf(“New_Max”));
if(@P.y<-0.2) len*=4;
v@force -= dir * len;
Recent Comments