Body
A rigid body in the physics world.
Properties
Angular damping. Controls how quickly the angular velocity decreases.
The angular velocity in radians per second.
Get the maximum number of contacts for this body (capacity).
The gravity scale.
Whether this body has fixed rotation (cannot rotate).
Whether sleep is enabled for this body.
Get the number of joints connected to this body.
Linear damping. Controls how quickly the linear velocity decreases.
The linear velocity of the body's center of mass.
Get the local center of mass position.
Get the number of shapes attached to this body.
The sleep threshold speed. A body will not sleep below this speed.
Get the world center of mass position.
Functions
Apply an angular impulse.
Apply a force at a world point. If the force is not applied at the center of mass, it will generate a torque.
Apply a force to the center of mass.
Apply an impulse at a world point. This immediately modifies the velocity.
Apply an impulse to the center of mass.
Recompute the body mass properties from all attached shapes.
Apply a torque.
Create a capsule shape and attach it to this body.
Create a chain shape and attach it to this body.
Create a circle shape and attach it to this body.
Create a polygon shape and attach it to this body.
Create a segment (line) shape and attach it to this body.
Enable or disable contact events for all shapes on this body.
Enable or disable hit events for all shapes on this body.
Get contact data for this body.
Get a local point given a world point.
Get the linear velocity of a local point on the body (in world coordinates).
Get a local vector given a world vector.
Get the mass data for this body.
Get a world point given a local point.
Get the linear velocity of a world point attached to the body.
Get a world vector given a local vector.
Set the mass data for this body.
Set the target transform for a kinematic body. This will be reached over the given time step.