Chipmunk2D Unity Documentation | Main Page | Forum

Manual

Tutorials

API

Classes

Structs

Enumerations

ChipmunkBody

Class : Inherits from MonoBehaviour

A ChipmunkBody is the Chipmunk equivalent of Unity's Rigidbody component.


Variables


momentCalculationModeHow the moment of inertia should be calculated when the object is created.
interpolationModeHow the transform position should be set before Update() methods are called.
massMass of the body.
momentMoment of inertia of the body.
positionPosition of the rigid body.
angleAngle of the body in radians.
velocityLinear velocity of the rigid body's center of gravity.
forceForce applied to the rigid body's center of gravity.
angularVelocityAngular velocity of the rigid body in radians/second.
torqueTorque applied to the rigid body.
velocityLimitLinear velocity limit for the body.
angularVelocityLimitAngular velocity limit for the body in radians/second.
cogOffsetCenter of gravity position relative to rigid body's parent transform.
isKinematicIndicates if the rigid body is kinematic or not.
isSleepingIndicates if the rigid body is sleeping or not.
kineticEnergyGet the amount of kinetic energy of the rigid body. Units are in mass*velocity^2.


Functions


ActivateWake up the rigid body if it is sleeping.
SleepForce a body to fall asleep immediately.
ResetForcesReset the force and torque applied to a body to zero.
ApplyForceApply (accumulate) a force on the body at the given point in the transform's local coords.
ApplyImpulseApply an impulse on the body at the given point in the transform's local coords.
VelocityAtWorldPointGet the velocity of a specific point on the rigid body as specified in world coords
VelocityAtLocalPointGet the velocity of a specific point on the rigid body as specified in the transform's local coords
EachArbiterUses a delegate function to iterate over the ChipmunkArbiter structs associated with this rigid body.