Phaser API Documentation

  Version: 
setHitAreaEllipse(gameObjects, x, y, width, height, [callback])

Description:

Sets the hit area for an array of Game Objects to be a Phaser.Geom.Ellipse shape, using the given coordinates and dimensions 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 an ellipse hit area.

x number

The center of the ellipse.

y number

The center of the ellipse.

width number

The width of the ellipse.

height number

The height of the ellipse.

callback Phaser.Types.Input.HitAreaCallback <optional>

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

Returns:
Description:

This InputPlugin object.

Examples:
Since: 3.0.0