SphereShape

Edit

A type of Shape that can be used for spheres.

Constructors

lovr.physics.newSphereShapeCreate a new SphereShape.
World:newSphereColliderAdd a Collider with a SphereShape 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.
SphereShape:getRadiusGet the radius of the SphereShape.
SphereShape:setRadiusSet the radius of the SphereShape.

See also