World::HandleNewRigidBodyContact
Defined in:
Called by default when a new contact is made between two rigid bodies.
C4World.h
Prototype
virtual RigidBodyStatus HandleNewRigidBodyContact(RigidBodyController *rigidBody, const RigidBodyContact *contact, RigidBodyController *contactBody);
Parameters
rigidBody |
One rigid body making contact. |
contact |
The new contact. |
contactBody |
The other rigid body making contact. |
Description
The HandleNewRigidBodyContact
function is called by the RigidBodyController
class by default when a rigid body makes a new contact with another rigid body. This function can be overridden in a subclass of World
in order to carry out a specialized response to a collision.The
HandleNewRigidBodyContact
function should return one of the following constants.
kRigidBodyUnchanged |
No change was made to the rigid body or its contacts. |
kRigidBodyContactsBroken |
One or more contacts with the rigid body were broken or may have been broken. |
kRigidBodyDestroyed |
The rigid body was destroyed. |
HandleNewRigidBodyContact
function returns kRigidBodyUnchanged
.
See Also
World::HandleNewGeometryContact