VolumeCollider
Inherited: None
Description
The VolumeCollider class provides functionality for defining a collider with a specific volume. It supports both physical and trigger collider modes, associated physics material, and can be integrated with other components in a game or simulation to enable accurate collision detection and response.
Public Methods
const Vector3 & |
center () const |
void |
|
bool |
isDirty () const |
material () const |
|
void |
retrieveContact (const Collider * collider) const |
void |
setCenter (const Vector3 center) |
void |
setMaterial (PhysicMaterial * material) |
void |
setTrigger (bool trigger) |
bool |
trigger () const |
Static Methods
None
Methods Description
const Vector3 & VolumeCollider::center () const
Returns the local center of the volume collider.
See also setCenter().
void VolumeCollider::createCollider ()
Reimplements: Collider::createCollider().
Creates the collision object for the volume collider. If the collider is a trigger, it is added as a ghost object; otherwise, it is created as a physical collider.
bool VolumeCollider::isDirty () const
Returns true if the collider is dirty, false otherwise.
PhysicMaterial * VolumeCollider::material () const
Returns the physics material associated with the volume collider.
See also setMaterial().
void VolumeCollider::retrieveContact (Collider * collider) const
Retrieves contact information with another collider.
void VolumeCollider::setCenter (Vector3 center)
Sets the local center of the volume collider.
See also *center*().
void VolumeCollider::setMaterial (PhysicMaterial * material)
Sets the physics material for the volume collider.
See also *material*().
void VolumeCollider::setTrigger (bool trigger)
Sets whether the volume collider should function as a trigger.
See also *trigger*().
bool VolumeCollider::trigger () const
Returns true if the collider is a trigger, false otherwise.
See also setTrigger().