Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Pull particles in a given direction
#6
(25-05-2021, 10:21 AM)xkalibrx Wrote:
When I set particle positions the rope shakes terribly, I assume this is because the solver pulls those particles back. Is that correct? If so, is there a way to counteract this?

We have distance, bending and particle collisions constraints enabled in our solver in case that matters.
Thank you again!

Setting the position of a particle will affect all neighboring particles indeed, since they're linked to each other trough constraints. These are updated as part of the physics simulation, in FixedUpdate(). You can't disable these, as the rope will stop behaving like a rope.

Depending on where in Unity's update cycle you're setting particle positions, this can cause jitter as FixedUpdate and Update are called at different frequencies. Physics-related stuff should always be updated in FixedUpdate.

Also depending on what your needs are, maybe all you need to displace is the rope's mesh, and not particles themselves. This can be done by modifying ObiRopeExtrudedRenderer.cs to move path frames (ObiPathFrame structs) around prior to building the mesh. Consider whether this is feasible in your case.
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, 10:26 AM