![]() |
• Physics Manager | ||||||||||
|
API Links
Developer Links
|
RigidBodyController::HandleNewRigidBodyContactDefined in:
Called when a new contact is made with another rigid body.
C4Physics.hPrototype
Parameters
Description
The HandleNewRigidBodyContact function is called by the Physics Manager when a rigid body makes a new contact with another rigid body. This function can be overridden in a subclass of RigidBodyController in order to carry out a specialized response to a collision.The contact parameter specifies the newly created RigidBodyContact object, which is an edge in the contact graph maintained by the Physics Manager. The rigid body for which the HandleNewRigidBodyContact function is called can be either the start node or finish node for this edge. The contactBody parameter specifies the other rigid body involved in the new contact, which is always on the opposite end of the contact edge relative to the rigid body for which the HandleNewRigidBodyContact function is called.When a collision occurs between two rigid bodies, the HandleNewRigidBodyContact function is called once for each rigid body. The order of the two calls is not defined, so any overridden function should not depend on the HandleNewRigidBodyContact function being called for the start node of the contact parameter before the finish node or vice-versa.An overridden HandleNewRigidBodyContact function can call the RigidBodyContact::GetWorldContactPosition function to obtain the world-space position and normal corresponding to one of the rigid bodies involving in the contact.The HandleNewRigidBodyContact function should return one of the following values.
HandleNewRigidBodyContact function calls the World::HandleNewRigidBodyContact function.
See Also
|