Collider

Edit

Colliders represent a single rigid body in the physics simulation.

Constructors

World:newColliderAdd a Collider to the World.
World:newBoxColliderAdd a Collider with a BoxShape to the World.
World:newSphereColliderAdd a Collider with a SphereShape to the World.
World:newCapsuleColliderAdd a Collider with a CapsuleShape to the World.
World:newCylinderColliderAdd a Collider with a CylinderShape to the World.
World:newConvexColliderAdd a Collider with a ConvexShape to the World.
World:newMeshColliderAdd a Collider with a MeshShape to the World.
World:newTerrainColliderAdd a Collider with a TerrainShape to the World.

Motion

Collider:getPositionGet the position of the Collider.
Collider:setPositionSet the position of the Collider.
Collider:getOrientationGet the orientation of the Collider.
Collider:setOrientationSet the orientation of the Collider.
Collider:getPoseGet the pose of the Collider.
Collider:setPoseSet the pose of the Collider.
Collider:getLocalPointTransform a point from world space to collider space.
Collider:getWorldPointTransform a point from local space to world space.
Collider:getLocalVectorTransform a vector from world space to local space.
Collider:getWorldVectorTransform a vector from local space to world space.
Collider:getAABBGet the Collider's axis aligned bounding box.
Collider:getLinearVelocityGet the linear velocity of the Collider.
Collider:setLinearVelocitySet the linear velocity of the Collider.
Collider:getAngularVelocityGet the angular velocity of the Collider.
Collider:setAngularVelocitySet the angular velocity of the Collider.
Collider:getLinearVelocityFromLocalPointGet the linear velocity of a point on the Collider.
Collider:getLinearVelocityFromWorldPointGet the linear velocity of the Collider at a world space point.
Collider:moveKinematicTODO
Collider:applyForceApply a force to the Collider.
Collider:applyTorqueApply torque to the Collider.
Collider:applyLinearImpulseApply a linear impulse to the Collider.
Collider:applyAngularImpulseApply an angular impulse to the Collider.
Collider:getLinearDampingGet the linear damping of the Collider.
Collider:setLinearDampingSet the linear damping of the Collider.
Collider:getAngularDampingGet the angular damping of the Collider.
Collider:setAngularDampingSet the angular damping of the Collider.
Collider:isKinematicCheck if the Collider is kinematic.
Collider:setKinematicSet whether the Collider is kinematic.
Collider:isContinuousCheck if the Collider is using continuous collision detection.
Collider:setContinuousSet whether the Collider uses continuous collision detection.
Collider:getDegreesOfFreedomGet the enabled translation/rotation axes.
Collider:setDegreesOfFreedomSet the enabled translation/rotation axes.
Collider:getGravityScaleGet the gravity scale of the Collider.
Collider:setGravityScaleSet the gravity scale of the Collider.
Collider:isSleepingAllowedCheck if the Collider is allowed to sleep.
Collider:setSleepingAllowedSet whether the Collider is allowed to sleep.
Collider:isAwakeCheck if the Collider is awake.
Collider:setAwakePut the Collider to sleep or wake it up.

Collision

Collider:getTagGet the Collider's tag.
Collider:setTagSet the Collider's tag.
Collider:getShapeGet the first Shape attached to the Collider.
Collider:getShapesGet a list of Shapes attached to the Collider.
Collider:addShapeAdd a Shape to the Collider.
Collider:removeShapeRemove a Shape from the Collider.
Collider:isSensorCheck if the Collider is a sensor.
Collider:setSensorSet whether the Collider should be a sensor.
Collider:getFrictionGet the friction of the Collider.
Collider:setFrictionSet the friction of the Collider.
Collider:getRestitutionGet the bounciness of the Collider.
Collider:setRestitutionSet the bounciness of the Collider.

Mass

Collider:getMassGet the mass of the Collider.
Collider:setMassSet the mass of the Collider.
Collider:getInertiaGet the inertia of the Collider.
Collider:setInertiaSet the inertia of the Collider.
Collider:getCenterOfMassGet the Collider's local center of mass.
Collider:setCenterOfMassSet the Collider's center of mass.
Collider:getAutomaticMassGet whether automatic mass is enabled.
Collider:setAutomaticMassEnable or disable automatic mass.
Collider:resetMassDataReset mass properties.

Miscellaneous

Collider:getUserDataGet the Lua value associated with the Collider.
Collider:setUserDataAssociate a Lua value with the Collider.
Collider:isEnabledCheck if the Collider is enabled.
Collider:setEnabledEnable or disable the Collider.
Collider:getWorldGet the World the Collider is in.
Collider:getJointsGet a list of Joints attached to the Collider.
Collider:destroyDestroy the Collider.
Collider:isDestroyedCheck if the Collider has been destroyed.

See also