21-12-2020, 01:34 PM
(This post was last modified: 21-12-2020, 01:36 PM by josemendez.)
(21-12-2020, 01:16 PM)zagoalie Wrote: I am using A Obi skinned renderer on some fabric attached to a 3d hand/curser. when I move the hang around the cloth seems to lag behind it. the part of the cloth along the top of the hand is set to zero on all of its constraints, yet still, it seems to trail behind the hand.
here is video of the issue: https://gyazo.com/86cc2f1cc0ea6ee0817190786a4dbdf6
I have tried turning damping on and off as well as interpolation and shock propagation seems like none of the obi solver settings fix this problem.
my goal is that the top of the cloth stays bound statically to the hand, and only the hanging tails move around in relation to how the hand is moving.
Edit: i am also using the particular attachment script attaching the upper cloths particles to the bone in the for arm, still no luck.
You just have to keep Unity's update order in mind.
Physics (including cloth) are updated in FixedUpdate() by default, which is called before Update(). Make sure you're moving the hand at the start of FixedUpdate(), or you will introduce a 1-frame delay. Typically, you'd use Update() or LateUpdate() to move the hand, but that's too late as physics have already been updated that frame. See:https://docs.unity3d.com/Manual/ExecutionOrder.html
For convenience, you can subscribe to solver.BeginStep event and move the hand there. This event is called right before cloth physics are updated, so you don't have to worry about your script's FixedUpdate() being called before/after the solver's FixedUpdate().