C4 Engine Terathon Software C4 Engine API Documentation

• World Manager

API Links
Developer Links

World::HandleNewRigidBodyContact

Defined in:  C4World.h
Called by default when a new contact is made between two rigid bodies.
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 values.
kRigidBodyUnchanged No change was made to the rigid body.
kRigidBodyDestroyed The rigid body was destroyed.
kRigidBodyDetached All contacts with the rigid body were broken.
The default implementation of the HandleNewRigidBodyContact function returns kRigidBodyUnchanged.
See Also

World::HandleNewGeometryContact

RigidBodyController::HandleNewRigidBodyContact

RigidBodyContact