diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index 7ff8fb47a..d23479f75 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -983,7 +983,7 @@ var World = new Class({ } } - this.emit(Events.WORLD_STEP); + this.emit(Events.WORLD_STEP, fixedDelta); } // Process any additional steps this frame @@ -1042,7 +1042,7 @@ var World = new Class({ } } - this.emit(Events.WORLD_STEP); + this.emit(Events.WORLD_STEP, delta); this.stepsLastFrame++; }, diff --git a/src/physics/arcade/events/WORLD_STEP_EVENT.js b/src/physics/arcade/events/WORLD_STEP_EVENT.js index dc404d7a6..f815e8235 100644 --- a/src/physics/arcade/events/WORLD_STEP_EVENT.js +++ b/src/physics/arcade/events/WORLD_STEP_EVENT.js @@ -6,15 +6,17 @@ /** * The Arcade Physics World Step Event. - * + * * This event is dispatched by an Arcade Physics World instance whenever a physics step is run. * It is emitted _after_ the bodies and colliders have been updated. - * + * * In high framerate settings this can be multiple times per game frame. - * + * * Listen to it from a Scene using: `this.physics.world.on('worldstep', listener)`. * * @event Phaser.Physics.Arcade.Events#WORLD_STEP * @since 3.18.0 + * + * @param {number} delta - The delta time amount of this step, in seconds. */ module.exports = 'worldstep';