Collider

Colliders are objects that represent a single rigid body in a physics simulation. They can have forces applied to them and collide with other colliders.

Constructors

World:newColliderAdd a Collider to the World.
World:newBoxColliderAdd a Collider with a BoxShape to the World.
World:newCapsuleColliderAdd a Collider with a CapsuleShape to the World.
World:newCylinderColliderAdd a Collider with a CylinderShape to the World.
World:newSphereColliderAdd a Collider with a SphereShape to the World.

Methods

Collider:getAABBGet the Collider's axis aligned bounding box.
Collider:addShapeAdd a Shape to the Collider.
Collider:getTagGet the Collider's tag.
Collider:setTagSet the Collider's tag.
Collider:applyForceApply a force to the Collider.
Collider:applyTorqueApply torque to the Collider.
Collider:getMassGet the total mass of the Collider.
Collider:setMassSet the total mass of the Collider.
Collider:getMassDataCompute mass properties for the Collider.
Collider:setMassDataSet mass properties for the Collider.
Collider:destroyDestroy the Collider.
Collider:getRestitutionGet the bounciness of the Collider.
Collider:setRestitutionSet the bounciness of the Collider.
Collider:getShapesGet a list of Shapes attached to the Collider.
Collider:getLinearDampingGet the linear damping of the Collider.
Collider:setLinearDampingSet the linear damping of the Collider.
Collider:getLinearVelocityGet the linear velocity of the Collider.
Collider:setLinearVelocitySet the linear velocity of the Collider.
Collider:getLinearVelocityFromLocalPointGet the linear velocity of the Collider at a point.
Collider:getLinearVelocityFromWorldPointGet the linear velocity of the Collider at a world space point.
Collider:isKinematicCheck if the Collider is kinematic.
Collider:setKinematicSet whether the Collider is kinematic.
Collider:isSleepingAllowedCheck if the Collider is allowed to sleep.
Collider:setSleepingAllowedSet whether the Collider is allowed to sleep.
Collider:getAngularDampingGet the angular damping of the Collider.
Collider:setAngularDampingSet the angular damping of the Collider.
Collider:getAngularVelocityGet the angular velocity of the Collider.
Collider:setAngularVelocitySet the angular velocity of the Collider.
Collider:getLocalCenterGet the Collider's center of mass.
Collider:getLocalPointConvert a point from world space to collider space.
Collider:getLocalVectorConvert a vector from world space to local space.
Collider:getJointsGet a list of Joints attached to the Collider.
Collider:getWorldGet the World the Collider is in.
Collider:getWorldPointConvert a point from local space to world space.
Collider:getWorldVectorConvert a vector from local space to world space.
Collider:getPositionGet the position of the Collider.
Collider:setPositionSet the position of the Collider.
Collider:isGravityIgnoredCheck if the Collider ignores gravity.
Collider:setGravityIgnoredSet whether the Collider ignores gravity.
Collider:removeShapeRemove a Shape from the Collider.
Collider:getFrictionGet the friction of the Collider.
Collider:setFrictionSet the friction of the Collider.
Collider:getOrientationGet the orientation of the Collider.
Collider:setOrientationSet the orientation of the Collider.
Collider:getUserDataGet the Collider's user data.
Collider:setUserDataSet the Collider's user data.
Collider:isAwakeCheck if the Collider is awake.
Collider:setAwakePut the Collider to sleep or wake it up.

See also