Physics.Arcade.Body#stopMovement()

stopMovement(stopVelocity)

If this Body is moving as a result of a call to moveTo or moveFrom (i.e. it
has Body.isMoving true), then calling this method will stop the movement before
either the duration or distance counters expire.

The onMoveComplete signal is dispatched.

Parameters
Name Type Argument Description
stopVelocity boolean <optional>

Should the Body.velocity be set to zero?

Source code: physics/arcade/Body.js (Line 681)
doc_phaser
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.