Function onPhysicsCollision
-
Parameters
- world: PhysicsWorld
The physics world to listen on.
- cb: (info: PhysicsCollisionInfo) => void
Callback invoked with each PhysicsCollisionInfo as it is read.
Returns void
- world: PhysicsWorld
The physics world to listen on.
Callback invoked with each PhysicsCollisionInfo as it is read.
Register a callback invoked once per collision event after each physics step.
The events are produced by the Havok world step, so they are drained via the post-step hook (onPhysicsAfterStep). Enable events on the participating bodies first with setPhysicsBodyCollisionEventsEnabled, otherwise the stream is empty.