ChipmunkBody
Class : Inherits from MonoBehaviour
A ChipmunkBody is the Chipmunk equivalent of Unity's Rigidbody component.
Variables
momentCalculationMode | How the moment of inertia should be calculated when the object is created. |
interpolationMode | How the transform position should be set before Update() methods are called. |
mass | Mass of the body. |
moment | Moment of inertia of the body. |
position | Position of the rigid body. |
angle | Angle of the body in radians. |
velocity | Linear velocity of the rigid body's center of gravity. |
force | Force applied to the rigid body's center of gravity. |
angularVelocity | Angular velocity of the rigid body in radians/second. |
torque | Torque applied to the rigid body. |
velocityLimit | Linear velocity limit for the body. |
angularVelocityLimit | Angular velocity limit for the body in radians/second. |
cogOffset | Center of gravity position relative to rigid body's parent transform. |
isKinematic | Indicates if the rigid body is kinematic or not. |
isSleeping | Indicates if the rigid body is sleeping or not. |
kineticEnergy | Get the amount of kinetic energy of the rigid body. Units are in mass*velocity^2. |
Functions
Activate | Wake up the rigid body if it is sleeping. |
Sleep | Force a body to fall asleep immediately. |
ResetForces | Reset the force and torque applied to a body to zero. |
ApplyForce | Apply (accumulate) a force on the body at the given point in the transform's local coords. |
ApplyImpulse | Apply an impulse on the body at the given point in the transform's local coords. |
VelocityAtWorldPoint | Get the velocity of a specific point on the rigid body as specified in world coords |
VelocityAtLocalPoint | Get the velocity of a specific point on the rigid body as specified in the transform's local coords |
EachArbiter | Uses a delegate function to iterate over the ChipmunkArbiter structs associated with this rigid body. |