Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Moving Local-Space Solver causes child Cloth to jump & tear?
#5
(17-06-2019, 07:18 PM)josemendez Wrote: Hi there,

You should move your ship *before* the physics update for the solver happens, or a 1-frame delay will be introduced. The solver has lots of events for you to hook up custom code to. You should probably use solver.OnStepBegin, that is called right before each physics step. However, this alone won't help with teleporting.

Take a look at the ObiActorTeleport.cs script. (found in Obi/SampleScenes/SampleResources/Scripts). To teleport an actor, you should:
-disable it.
-teleport it.
-wait for the next FixedUpdate and re-enable it.

Carefully scheduling the order in which things should happen each frame is of vital importance when working with physics, as it is easy to introduce jitter/lags if using an incorrect setup.

Great, that was it. I wasn't aware of WaitForFixeUpdate. Teleporting without a hitch now. Cheers!
Reply


Messages In This Thread
RE: Moving Local-Space Solver causes child Cloth to jump & tear? - by jabza - 17-06-2019, 10:25 PM