25-05-2021, 02:18 PM
(This post was last modified: 25-05-2021, 02:22 PM by josemendez.)
(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.