Phaser API Documentation

  Version: 
setHitArea(hitArea, hitAreaCallback)

Description:

Passes all group members to the Input Manager to enable them for input with identical areas and callbacks.

Parameters:

name type description
hitArea *

Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.

hitAreaCallback Phaser.Types.Input.HitAreaCallback

A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback.

Returns:
Description:

This Group object.

Since: 3.21.0