16-08-2021, 08:39 AM
(This post was last modified: 16-08-2021, 08:39 AM by josemendez.)
Hi there,
Glad you found a workaround! Not sure why running Octane would cause the fixed delta to get set to 0.0001, but that is indeed bound to cause some issues. Add to this the fact that Obi generally uses substepping (4 substeps by default) and that would yield a delta of 0.000025 seconds per substep.
I took a look at your code, looks ok except for one line in the Update() method:
this should be:
You should pass the duration of the last timestep as the first argument, and the amount of "unsimulated" time left as the second one.
Otherwise physics state interpolation won't work well (if you're using it, can be enabled/disabled in the ObiSolver component).
Glad you found a workaround! Not sure why running Octane would cause the fixed delta to get set to 0.0001, but that is indeed bound to cause some issues. Add to this the fact that Obi generally uses substepping (4 substeps by default) and that would yield a delta of 0.000025 seconds per substep.
I took a look at your code, looks ok except for one line in the Update() method:
Code:
Interpolate(Time.fixedDeltaTime, accumulatedTime);
this should be:
Code:
Interpolate(TimeStepDelta, accumulatedTime);
You should pass the duration of the last timestep as the first argument, and the amount of "unsimulated" time left as the second one.
Otherwise physics state interpolation won't work well (if you're using it, can be enabled/disabled in the ObiSolver component).