21-06-2023, 06:59 AM
(This post was last modified: 21-06-2023, 07:00 AM by josemendez.)
(01-06-2023, 03:40 PM)Renman3000 Wrote: Hi thanks!
So the Particle Attachment is set to Static.
And In Update, I am moving the effector position, relative to the body.
Hi!
Physics in Unity (including rope physics) are updated in FixedUpdate(), which takes place before Update(). See:
https://docs.unity3d.com/Manual/ExecutionOrder.html
If you move the effector in Update(), you're moving it after the rope has been updated. This means there will always be a 1-frame delay in the position of the rope relative to the effector, since the rope has no chance to update the attachment position until the next FixedUpdate() if you move the effector in Update().
You must move the effector before physics are updated. You can do this easily by subscribing to the solver's OnBeginStep event: http://obi.virtualmethodstudio.com/manua...olver.html
kind regards,