Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Speed Up Rope Tracing Attactchment?
#5
(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,
Reply


Messages In This Thread
RE: Speed Up Rope Tracing Attactchment? - by josemendez - 21-06-2023, 06:59 AM