Collider

Edit

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.
World:newMeshColliderAdd a Collider with a MeshShape to the World.

Methods

Collider:addShapeAdd a Shape to the Collider.
Collider:applyForceApply a force to the Collider.
Collider:applyTorqueApply torque to the Collider.
Collider:destroyDestroy the Collider.
Collider:getAABBGet the Collider's axis aligned bounding box.
Collider:getAngularDampingGet the angular damping of the Collider.
Collider:getAngularVelocityGet the angular velocity of the Collider.
Collider:getFrictionGet the friction of the Collider.
Collider:getJointsGet a list of Joints attached to the Collider.
Collider:getLinearDampingGet the linear damping of the Collider.
Collider:getLinearVelocityGet 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: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:getMassGet the total mass of the Collider.
Collider:getMassDataCompute mass properties for the Collider.
Collider:getOrientationGet the orientation of the Collider.
Collider:getPoseGet the pose of the Collider.
Collider:getPositionGet the position of the Collider.
Collider:getRestitutionGet the bounciness of the Collider.
Collider:getShapesGet a list of Shapes attached to the Collider.
Collider:getTagGet the Collider's tag.
Collider:getUserDataGet the Collider's user data.
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:isAwakeCheck if the Collider is awake.
Collider:isGravityIgnoredCheck if the Collider ignores gravity.
Collider:isKinematicCheck if the Collider is kinematic.
Collider:isSleepingAllowedCheck if the Collider is allowed to sleep.
Collider:removeShapeRemove a Shape from the Collider.
Collider:setAngularDampingSet the angular damping of the Collider.
Collider:setAngularVelocitySet the angular velocity of the Collider.
Collider:setAwakePut the Collider to sleep or wake it up.
Collider:setFrictionSet the friction of the Collider.
Collider:setGravityIgnoredSet whether the Collider ignores gravity.
Collider:setKinematicSet whether the Collider is kinematic.
Collider:setLinearDampingSet the linear damping of the Collider.
Collider:setLinearVelocitySet the linear velocity of the Collider.
Collider:setMassSet the total mass of the Collider.
Collider:setMassDataSet mass properties for the Collider.
Collider:setOrientationSet the orientation of the Collider.
Collider:setPoseSet the pose of the Collider.
Collider:setPositionSet the position of the Collider.
Collider:setRestitutionSet the bounciness of the Collider.
Collider:setSleepingAllowedSet whether the Collider is allowed to sleep.
Collider:setTagSet the Collider's tag.
Collider:setUserDataSet the Collider's user data.

See also