Physics.P2#setPostBroadphaseCallback()

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)
doc_phaser
2017-02-14 11:01:33
Comments
Leave a Comment

Please login to continue.