Phaser API Documentation

  Version: 
hitTestPointer(pointer)

Description:

Takes the given Pointer and performs a hit test against it, to see which interactive Game Objects it is currently above.

The hit test is performed against which-ever Camera the Pointer is over. If it is over multiple cameras, it starts checking the camera at the top of the camera list, and if nothing is found, iterates down the list.

Parameters:

name type description
pointer Phaser.Input.Pointer

The Pointer to check against the Game Objects.

Returns:
Description:

An array of all the interactive Game Objects the Pointer was above.

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