setPostBroadphaseCallback(callback, context)
Sets a callback to be fired after the Broadphase has collected collision pairs in the world.
Just because a pair exists it doesn't mean they will collide, just that they potentially could do.
If your calback returns false
the pair will be removed from the narrowphase. This will stop them testing for collision this step.
Returning true
from the callback will ensure they are checked in the narrowphase.
Parameters
Name | Type | Description |
---|---|---|
callback | function | The callback that will receive the postBroadphase event data. It must return a boolean. Set to null to disable an existing callback. |
context | object | The context under which the callback will be fired. |
- Source code: physics/p2/World.js (Line 413)
Please login to continue.