Skip to content

Commit 388e42c

Browse files
committed
Remove invalid multiply by 60 in Phaser.ArcadePhysics.updateMotion
1 parent 7917eac commit 388e42c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/physics/arcade/ArcadePhysics.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,19 +172,19 @@ Phaser.Physics.Arcade.prototype = {
172172
// If you're wondering why the velocity is halved and applied twice, read this: http://www.niksula.hut.fi/~hkankaan/Homepages/gravity.html
173173

174174
// Rotation
175-
this._velocityDelta = (this.computeVelocity(0, body, body.angularVelocity, body.angularAcceleration, body.angularDrag, body.maxAngular) - body.angularVelocity) * this.game.time.physicsElapsed * 0.5 * 60;
175+
this._velocityDelta = (this.computeVelocity(0, body, body.angularVelocity, body.angularAcceleration, body.angularDrag, body.maxAngular) - body.angularVelocity) * 0.5;
176176
body.angularVelocity += this._velocityDelta;
177177
body.rotation += (body.angularVelocity * this.game.time.physicsElapsed);
178178
body.angularVelocity += this._velocityDelta;
179179

180180
// Horizontal
181-
this._velocityDelta = (this.computeVelocity(1, body, body.velocity.x, body.acceleration.x, body.drag.x, body.maxVelocity.x) - body.velocity.x) * this.game.time.physicsElapsed * 0.5 * 60;
181+
this._velocityDelta = (this.computeVelocity(1, body, body.velocity.x, body.acceleration.x, body.drag.x, body.maxVelocity.x) - body.velocity.x) * 0.5;
182182
body.velocity.x += this._velocityDelta;
183183
body.x += (body.velocity.x * this.game.time.physicsElapsed);
184184
body.velocity.x += this._velocityDelta;
185185

186186
// Vertical
187-
this._velocityDelta = (this.computeVelocity(2, body, body.velocity.y, body.acceleration.y, body.drag.y, body.maxVelocity.y) - body.velocity.y) * this.game.time.physicsElapsed * 0.5 * 60;
187+
this._velocityDelta = (this.computeVelocity(2, body, body.velocity.y, body.acceleration.y, body.drag.y, body.maxVelocity.y) - body.velocity.y) * 0.5;
188188
body.velocity.y += this._velocityDelta;
189189
body.y += (body.velocity.y * this.game.time.physicsElapsed);
190190
body.velocity.y += this._velocityDelta;

0 commit comments

Comments
 (0)