Physics.P2#onBeginContact

onBeginContact : Phaser.Signal

This Signal is dispatched when a first contact is created between two bodies. This happens before the step has been done.

It sends 5 arguments: bodyA, bodyB, shapeA, shapeB and contactEquations.

It is possible that in certain situations the bodyA or bodyB values are null. You should check for this
in your own code to avoid processing potentially null physics bodies.

Source code: physics/p2/World.js (Line 182)
doc_phaser
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.