Physics.P2.Body#thrustRight()

thrustRight(speed)

Applies a force to the Body that causes it to 'thrust' to the right, based on its current angle and the given speed.
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

Parameters
Name Type Description
speed number

The speed at which it should move to the right.

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

Please login to continue.