Skip to content

Commit ff9f7cf

Browse files
committed
Always world step once
1 parent 04e4e07 commit ff9f7cf

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/physics/arcade/World.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,11 +927,14 @@ var World = new Class({
927927
}
928928
}
929929

930-
var stepsThisFrame = 0;
930+
var stepsThisFrame = 1;
931931
var fixedDelta = this._frameTime;
932932
var msPerFrame = this._frameTimeMS * this.timeScale;
933933

934-
this._elapsed += delta;
934+
this._elapsed += delta - msPerFrame;
935+
936+
// Always step once, no matter what
937+
this.step(fixedDelta);
935938

936939
while (this._elapsed >= msPerFrame)
937940
{

0 commit comments

Comments
 (0)