05-05-2018, 12:56 PM
Hi there,
Here's the fix. Replace ObiSolver.cs' LateUpdate method with this one:
Here's the fix. Replace ObiSolver.cs' LateUpdate method with this one:
Code:
private void LateUpdate(){
float lateUpdateDelta = 0;
if (Application.isPlaying && simulationOrder == SimulationOrder.LateUpdate){
if (Time.deltaTime > 0){
// smooth out timestep and accumulate it:
lateUpdateDelta = smoothDelta = Mathf.Lerp(Time.deltaTime,smoothDelta,0.95f);
AccumulateSimulationTime(lateUpdateDelta);
SimulateStep(lateUpdateDelta);
}else{
lateUpdateDelta = 0;
}
}
if (!Application.isPlaying)
return;
EndFrame (simulationOrder == SimulationOrder.LateUpdate ? lateUpdateDelta : Time.fixedDeltaTime);
if (OnFrameEnd != null)
OnFrameEnd(this,null);
}