02-07-2021, 11:35 AM
(This post was last modified: 02-07-2021, 11:39 AM by josemendez.)
(02-07-2021, 11:10 AM)alex798 Wrote: It's stretching because one end should be connected to unmoving objects, and the other to object, which we can freelly pull... Ok, is there some event that rope is stretching or updating amount of stretch?- maybe I could free pullable object on this event- so no stretching occur
Why not use dynamic attachments for this? it's exactly what they're designed for: coupling between objects and ropes.
In real life, if you attach the rope to an object and pull the object, once the rope is fully stretched you won't be able to pull the object further away. This is because the rope exerts a force on the object, of equal magnitude but opposite direction to the pulling force. Both forces cancel each other out, and the object no longer moves.
Using a dynamic attachment to attach the rope to the object you're pulling (and obviously, using forces to pull the object instead of explicitly setting its position) simulates this. See:
http://obi.virtualmethodstudio.com/manua...ments.html
Quote:By using dynamic attachments, you allow the particles to be fully simulated and exchange impulses with rigidbodies. This means the actor will be affected by the rigidbody's movements, and the rigidbody will in turn be affected by the actor. The technical name for this kind of behavior is two-way coupling.
On the other hand, a static attachment will force the rope to go wherever the object goes. It can't apply any forces back to the object, so it will stretch as much as necessary.