CapsuleShape

Edit

A type of Shape that can be used for capsule-shaped things.

Constructors

lovr.physics.newCapsuleShapeCreate a new CapsuleShape.
World:newCapsuleColliderAdd a Collider with a CapsuleShape to the World.

Methods

Shape:containsPointCheck if a point is inside the shape.
Shape:destroyDestroy the Shape.
Shape:getAABBGet the Shape's axis aligned bounding box.
Shape:getCenterOfMassGet the center of mass of the Shape.
Shape:getColliderGet the Collider the Shape is attached to.
Shape:getDensityGet the density of the Shape.
Shape:getInertiaGet the inertia of the Shape.
Shape:getMassGet the mass of the Shape.
Shape:getOffsetGet the local offset of the Shape.
Shape:getOrientationGet the orientation of the Shape.
Shape:getPoseGet the pose of the Shape.
Shape:getPositionGet the position of the Shape.
Shape:getTypeGet the type of the Shape.
Shape:getUserDataGet the Lua value associated with the Shape.
Shape:getVolumeGet the volume of the Shape.
Shape:isDestroyedCheck if the Shape is destroyed.
Shape:raycastCast a ray against the shape.
Shape:setDensitySet the density of the Shape.
Shape:setOffsetSet the local offset of the Shape.
Shape:setUserDataAssociate a Lua value with the Shape.
CapsuleShape:getLengthGet the length of the CapsuleShape.
CapsuleShape:getRadiusGet the radius of the CapsuleShape.
CapsuleShape:setLengthSet the length of the CapsuleShape.
CapsuleShape:setRadiusSet the radius of the CapsuleShape.

See also