Shape
EditA Shape is a physics object that can be attached to colliders to define their shape.
Constructors
lovr.physics.newBoxShape | Create a new BoxShape. |
lovr.physics.newCapsuleShape | Create a new CapsuleShape. |
lovr.physics.newCylinderShape | Create a new CylinderShape. |
lovr.physics.newSphereShape | Create a new SphereShape. |
World:newBoxCollider | Add a Collider with a BoxShape to the World. |
World:newCapsuleCollider | Add a Collider with a CapsuleShape to the World. |
World:newCylinderCollider | Add a Collider with a CylinderShape to the World. |
World:newSphereCollider | Add a Collider with a SphereShape to the World. |
World:newMeshCollider | Add a Collider with a MeshShape to the World. |
Methods
Shape:destroy | Destroy the Shape. |
Shape:getAABB | Get the Shape's axis aligned bounding box. |
Shape:getCollider | Get the Collider the Shape is attached to. |
Shape:getMass | Compute mass properties of the Shape. |
Shape:getOrientation | Get the Shape's orientation. |
Shape:getPosition | Get the Shape's position. |
Shape:getType | Get the type of the Shape. |
Shape:getUserData | Get the Shape's user data. |
Shape:isEnabled | Check if the Shape is enabled. |
Shape:isSensor | Check if the Shape is a sensor. |
Shape:setEnabled | Enable or disable the Shape. |
Shape:setOrientation | Set the Shape's orientation. |
Shape:setPosition | Set the Shape's position. |
Shape:setSensor | Set the sensor status for the Shape. |
Shape:setUserData | Set the Shape's user data. |