BoxShape
EditA type of Shape
that can be used for cubes or boxes.
Constructors
lovr.physics.newBoxShape | Create a new BoxShape. |
World:newBoxCollider | Add a Collider with a BoxShape to the World. |
Methods
Shape:containsPoint | Check if a point is inside the shape. |
Shape:destroy | Destroy the Shape. |
Shape:getAABB | Get the Shape's axis aligned bounding box. |
Shape:getCenterOfMass | Get the center of mass of the Shape. |
Shape:getCollider | Get the Collider the Shape is attached to. |
Shape:getDensity | Get the density of the Shape. |
Shape:getInertia | Get the inertia of the Shape. |
Shape:getMass | Get the mass of the Shape. |
Shape:getOffset | Get the local offset of the Shape. |
Shape:getOrientation | Get the orientation of the Shape. |
Shape:getPose | Get the pose of the Shape. |
Shape:getPosition | Get the position of the Shape. |
Shape:getType | Get the type of the Shape. |
Shape:getUserData | Get the Lua value associated with the Shape. |
Shape:getVolume | Get the volume of the Shape. |
Shape:isDestroyed | Check if the Shape is destroyed. |
Shape:raycast | Cast a ray against the shape. |
Shape:setDensity | Set the density of the Shape. |
Shape:setOffset | Set the local offset of the Shape. |
Shape:setUserData | Associate a Lua value with the Shape. |
BoxShape:getDimensions | Get the dimensions of the BoxShape. |
BoxShape:setDimensions | Set the dimensions of the BoxShape. |