phaser - v4.0.0-rc.4
    Preparing search index...

    Enables a Matter-enabled Game Object to be a sensor. Should be used as a mixin and not directly.

    interface Sensor {
        isSensor(): boolean;
        setSensor(value: boolean): this;
    }

    Implemented by

    Index

    Methods

    • Is the body belonging to this Game Object a sensor or not?

      Returns boolean

    • 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

      • value: boolean

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

      Returns this