Physics.P2.Body#reset()

reset(x, y, resetDamping, resetMass)

Resets the Body force, velocity (linear and angular) and rotation. Optionally resets damping and mass.

Parameters
Name Type Argument Default Description
x number

The new x position of the Body.

y number

The new x position of the Body.

resetDamping boolean <optional>
false

Resets the linear and angular damping.

resetMass boolean <optional>
false

Sets the Body mass back to 1.

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

Please login to continue.