Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Pull particles in a given direction
#12
(25-05-2021, 02:04 PM)xkalibrx Wrote: But we couldn't figure out how to modify radii in such a way that the bulge sticks out from just one side.

Particles are spheres. You can't modify the radius of a sphere so that it bulges just from one side. Modifying radius changes the size of the sphere equally in all directions. You need to move the sphere, as in the pic you posted.

(25-05-2021, 02:04 PM)xkalibrx Wrote: As per your request this is how we set particle positons
_solver.positions[generatorIndex] += (Vector4)normal * 0.5f;
_solver.positions[generatorIndex + 1] += (Vector4)normal * 0.45f;
_solver.positions[generatorIndex - 1] += (Vector4)normal * 0.45f;

Where does "normal" come from? Is it the rope's frame normal at that point? since positions are fed back into the simulation (as they're the starting point for the next frame's simulation update), this in turn changes the normal of the rope at that point, resulting in a feedback loop and hence jittering.

What you want is to get the particle to move as a result of external data/behavior. In the hose example, this external data is another object against which the rope collides. You could also define an external, stable normal direction that does not change as the rope is simulated.

The key word here is *external*: since the position of the external object does not change as a result of setting the particle position, you won't get a feedback loop.
Reply


Messages In This Thread
Pull particles in a given direction - by xkalibrx - 19-05-2021, 05:09 PM
RE: Pull particles in a given direction - by josemendez - 25-05-2021, 02:18 PM