Physics.Arcade#enableBody()

enableBody(object)

Creates an Arcade Physics body on the given game object.

A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.

When you add an Arcade Physics body to an object it will automatically add the object into its parent Groups hash array.

Parameters
Name Type Description
object object

The game object to create the physics body on. A body will only be created if this object has a null body property.

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

Please login to continue.