Collider:setCenterOfMass
EditSets the Collider's center of mass, in the Collider's local coordinate space.
This does not change the Collider's position.
Arguments
Name | Type | Description |
x | number | The x component of the center of mass. |
y | number | The y component of the center of mass. |
z | number | The z component of the center of mass. |
Returns
Nothing
Notes
By default, the center of mass of the Collider is kept up to date automatically as the Collider's shapes change. To disable this, use Collider:setAutomaticMass
.
Use Collider:resetMassData
to reset the center and other mass properties based on the Collider's shapes.