- Home /
Ragdoll strech issues when dragging
Hi! I am just starting out with unity and i am trying different things. I have made a ragdoll of a fish to drag around and throw, however when i move the mouse too fast it starts stretching, sometimes to the point of really bugging out. Here is a live demo, click on the cylinder and hold to spawn a fish which you can drag around, dragging it around violently will recreate the issue. The fish has 5 character joins and each has a capsule collider. The tail bone is kinematic and is moved to the position of the mouse on an invisible plane.
I struggled with this type of behaviour for ages - in my case I was dragging a humanoid character up onto a ledge by their hand or foot. The problem was the man started to stretch and jitter everywhere.
After much searching I believe the issue stems from the fact that PhysX uses an 'iterative solver' and as a consequence can't cope with a large weight on the end of a small one. The ideal solution would be to use a 'direct solver'. This wasn't practical for me though - i wasn't about to write a new physics engine!
So ins$$anonymous$$d, when dragging the character I adjusted the weight distribution so that the point of contact was heavier and the dangling parts where lighter. If you wanted to try this out, then just adjust the weights of the rigidbodies directly in the inspector while the fish is stretched - when you hit the right numbers the fish should stay together better. It worked for me but required a lot of tweaking! HTH.
karlhulme: That comment should be the answer. I had a similar issue and the weight was exactly my solution!