MeshCollider
Inherited: None
Description
The MeshCollider class provides a way to create a collider based on a 3D mesh. The collider can be attached to a physics world, and its properties, such as the mesh, material, and enabled state, can be manipulated dynamically.
Public Methods
material () const |
|
Mesh * |
mesh () const |
void |
setMaterial (PhysicMaterial * material) |
void |
setMesh (Mesh * mesh) |
Static Methods
None
Methods Description
PhysicMaterial * MeshCollider::material () const
Returns a pointer to the physical material associated with the collider.
See also setMaterial().
Mesh * MeshCollider::mesh () const
Returns a pointer to the mesh used by the collider.
See also setMesh().
void MeshCollider::setMaterial (PhysicMaterial * material)
Sets the physical material for the collider. This method updates the friction and restitution properties of the collider.
See also *material*().
void MeshCollider::setMesh (Mesh * mesh)
Sets the mesh for the collider. This method recreates the collider’s shape and updates its properties.
See also *mesh*().