The body's center of mass.
Calling this creates a new `Vector2 each time to avoid mutation.
If you only need to read the value and won't change it, you can get it from GameObject.body.centerOfMass
.
Sets the mass of the Game Object's Matter Body.
name | type | description |
---|---|---|
value | number |
The new mass of the body. |
This Game Object instance.
Sets density of the body.
name | type | description |
---|---|---|
value | number |
The new density of the body. |
This Game Object instance.