new Body(sprite)
The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than
the Sprite itself. For example you can set the velocity, acceleration, bounce values etc all on the Body.
Parameters
Name | Type | Description |
---|---|---|
sprite | Phaser.Sprite | The Sprite object this physics body belongs to. |
- Source code: physics/arcade/Body.js (Line 15)
Please login to continue.