Phaser API Documentation

  Version: 

Member of: Phaser.Input

<static> CreateInteractiveObject(gameObject, hitArea, hitAreaCallback)

Description:

Creates a new Interactive Object.

This is called automatically by the Input Manager when you enable a Game Object for input.

The resulting Interactive Object is mapped to the Game Object's input property.

Parameters:

name type description
gameObject Phaser.GameObjects.GameObject

The Game Object to which this Interactive Object is bound.

hitArea any

The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle.

hitAreaCallback Phaser.Types.Input.HitAreaCallback

The 'contains' check callback that the hit area shape will use for all hit tests.

Returns:
Description:

The new Interactive Object.

Since: 3.0.0