C4 Engine
C4 Engine API Documentation

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

World::HandleNewRigidBodyContact

RigidBodyController::HandleNewGeometryContact

GeometryContact