8.8.3 ODECollisionEvent -- Collision event object

An ODECollisionEvent object is passed as argument to the event handler for ODE_COLLISION events.

class ODECollisionEvent( obj1, obj2, contacts, contactproperties)

obj1 and obj2 are the two world objects that have collided with each other.

contacts is a list of ode.Contact objects that each describes a contact point.

contactproperties is a ODEContactProperties object that describes the properties of the contact. It depends on the materials of the obj1 and obj2. The event handler may modify this object to change the result of the collision. Note however, that the changes will be permanent and also affect later collisions.

averageContactGeom( )
Return the average contact position, normal and penetration depth (in this order). The position and normal are returned as vec3 objects, the penetration depth is a float.