Physics.P2#setImpactEvents()

setImpactEvents(state)

Impact event handling is disabled by default. Enable it before any impact events will be dispatched.
In a busy world hundreds of impact events can be generated every step, so only enable this if you cannot do what you need via beginContact or collision masks.

Parameters
Name Type Description
state boolean

Set to true to enable impact events, or false to disable.

Source code: physics/p2/World.js (Line 393)
doc_phaser
2017-02-14 11:01:31
Comments
Leave a Comment

Please login to continue.