C
C#2w ago
MrScautHD

Physics

Hi guys! I have a question. Im calling this Step method in a FixedUpdate method. But as the documentation tells me of Jitter2 i need to impliment maxSteps. So if it cant go as fast the real time is, so it jumps... How could i impliment this?
protected internal override void Step(double fixedStep, int maxSteps = 4) {
this.World.Step((float)fixedStep, this._settings.MultiThreaded);
}
protected internal override void Step(double fixedStep, int maxSteps = 4) {
this.World.Step((float)fixedStep, this._settings.MultiThreaded);
}
(Importand, the Step method get called already in a FixedUpdate method, so i can not just only do the same thing like on the image)
No description
1 Reply
Sebastian
Sebastian2w ago
Have you read the documentation? https://docs.unity3d.com/6000.0/Documentation/ScriptReference/MonoBehaviour.FixedUpdate.html
MonoBehaviour.FixedUpdate has the frequency of the physics system; it is called every fixed frame-rate frame. Compute Physics system calculations after FixedUpdate. 0.02 seconds (50 calls per second) is the default time between calls. Use Time.fixedDeltaTime to access this value.
This would seem to be what you want:
private void FixedUpdate()
{
World.Step(Time.fixedDeltaTime, _settings.Multithreaded);
}
private void FixedUpdate()
{
World.Step(Time.fixedDeltaTime, _settings.Multithreaded);
}

Did you find this page helpful?