Phaser API Documentation

  Version: 
setHitAreaCircle(gameObjects, x, y, radius, [callback])

Description:

Sets the hit area for an array of Game Objects to be a Phaser.Geom.Circle shape, using the given coordinates and radius to control its position and size.

Parameters:

name type arguments description
gameObjects Phaser.GameObjects.GameObject | Array.<Phaser.GameObjects.GameObject>

An array of Game Objects to set as having a circle hit area.

x number

The center of the circle.

y number

The center of the circle.

radius number

The radius of the circle.

callback Phaser.Types.Input.HitAreaCallback <optional>

The hit area callback. If undefined it uses Circle.Contains.

Returns:
Description:

This InputPlugin object.

Since: 3.0.0