07-08-2017, 08:27 PM
Is there a way to make Obi Rope use an independent timescale? I'm slowing down Timescale in my game for a slow-motion effect but I want my rope to continue resolving at full-speed. Thanks!
Independent Timescale
|
07-08-2017, 08:27 PM
Is there a way to make Obi Rope use an independent timescale? I'm slowing down Timescale in my game for a slow-motion effect but I want my rope to continue resolving at full-speed. Thanks!
07-08-2017, 08:51 PM
(This post was last modified: 07-08-2017, 08:52 PM by josemendez.)
(07-08-2017, 08:27 PM)momothemonster Wrote: Is there a way to make Obi Rope use an independent timescale? I'm slowing down Timescale in my game for a slow-motion effect but I want my rope to continue resolving at full-speed. Thanks! Hi! The simulation step for the solver is done by solver.SimulateStep(deltaTime); This is usually called in FixedUpdate(), WaitForFixedUpdate() or LateUpdate(), depending on your solver settings. If you're using the default settings (FixedUpdate) then you can slightly modify ObiSolver.cs to achieve what you want: In its FixedUpdate() method, instead of passing Time.fixedDeltaTime to SimulateStep(), pass your own custom delta time. cheers!
07-08-2017, 09:41 PM
Thanks for the quick reply! I've switched to using LateUpdate and I do:
Code: smoothDelta = Mathf.Lerp(Time.unscaledDeltaTime,smoothDelta,0.95f); instead of Code: smoothDelta = Mathf.Lerp(Time.deltaTime,smoothDelta,0.95f); It would be fantastic if we could set this via the inspector in the future so we could update to new versions of Obi Rope without clobbering this fix. |
« Next Oldest | Next Newest »
|