Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Non-stretched rope with extendable length
#3
(09-10-2018, 08:44 AM)josemendez Wrote: This is a fundamental issue of all iterative physic engines, which account for nearly 100% of realtime physics: the more you increase the mass ratio between two objects, the slower convergence becomes (and so, chains of constraints become stretchy).

In most games this is avoided by one or a combination of:
- Reducing the fixed timestep (Unity's default is 0.02, try 0.01 or 0.005). See: https://docs.unity3d.com/Manual/class-TimeManager.html
- Reducing the rope resolution so that there are less particles in the rope, so convergence speed is not that much of a problem anymore.
- Clamping the mass ratio between the rope and the weight attached to it (the usual maximum ratio is 1/10).
- Attach the weight directly to the top of the crane by using a spring joint, and update the spring length so that it matches the rope's lenght. This way, the weight is supported by a single joint instead of a chain of distance constraints. This is similar to the concept behind tether constraints.

In extreme cases where none of these are acceptable, ditch iterative physics entirely and switch to a specialized direct solver. I've yet to see one of these in a game due to their bad (for game standards) performance, relatively common in engineering/industrial scenarios though.

How do I clamp the mass of the rope? Or should I change mass of the each particle?
How to change mass of the pooled particles? For example, I've changed mass of every particle from 0.1 to 5, except the first one, it's fixed. But when I extend the rope, new particles come with the old mass 0.1.
Reply


Messages In This Thread
RE: Non-stretched rope with extendable length - by Evgenius - 25-10-2018, 09:58 AM