Phaser API Documentation

  Version: 
setSensor(value)

Description:

Set the body belonging to this Game Object to be a sensor. Sensors trigger collision events, but don't react with colliding body physically.

Parameters:

name type description
value boolean

true to set the body as a sensor, or false to disable it.

Returns:
Description:

This Game Object.

Examples:
Since: 3.0.0