03-04-2023, 03:33 PM
(This post was last modified: 03-04-2023, 03:35 PM by josemendez.)
Hi,
Don't force the position of the sphere (this is a basic rule of thumb when dealing with physics in any engine) as that basically bypasses physics simulation and will only work with a static attachment - since it bypasses simulation too.
If you want to drag the sphere in a way consistent with physics, use rigidbody.AddForce to move the sphere towards the mouse cursor. Once the force you apply to the sphere and the one applied by the rope cancel each other out you won't be able to pull further, just like in a real rope.
kind regards,
Don't force the position of the sphere (this is a basic rule of thumb when dealing with physics in any engine) as that basically bypasses physics simulation and will only work with a static attachment - since it bypasses simulation too.
If you want to drag the sphere in a way consistent with physics, use rigidbody.AddForce to move the sphere towards the mouse cursor. Once the force you apply to the sphere and the one applied by the rope cancel each other out you won't be able to pull further, just like in a real rope.
kind regards,