C4 Engine Terathon Software C4 Engine API Documentation

• World Manager

API Links
Developer Links

World::HandleNewGeometryContact

Defined in:  C4World.h
Called by default when a new contact is made between a rigid body and a geometry node.
Prototype

virtual RigidBodyStatus HandleNewGeometryContact(RigidBodyController *rigidBody, const GeometryContact *contact);

Parameters
rigidBody The rigid body making contact.
contact The new contact.
Description
The HandleNewGeometryContact function is called by the RigidBodyController class by default when a rigid body makes a new contact with a geometry node. This function can be overridden in a subclass of World in order to carry out a specialized response to a collision.

The HandleNewGeometryContact 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 HandleNewGeometryContact function returns kRigidBodyUnchanged.
See Also

World::HandleNewRigidBodyContact

RigidBodyController::HandleNewGeometryContact

GeometryContact