Phaser API Documentation

clear(gameObject, [skipQueue])


Clears a Game Object so it no longer has an Interactive Object associated with it. The Game Object is then queued for removal from the Input Plugin on the next update.


name type arguments Default description
gameObject Phaser.GameObjects.GameObject

The Game Object that will have its Interactive Object removed.

skipQueue boolean <optional> false

Skip adding this Game Object into the removal queue?


The Game Object that had its Interactive Object removed.

Since: 3.0.0
Source: src/input/InputPlugin.js (Line 764)