Skip to content

Controller.getController()

Samir Zahran edited this page May 18, 2017 · 4 revisions

Gets a gamepad by it's index.

Returns: A Controller instance.

The Controller.getController() method takes an index and returns a reference to the gamepad at that index. If no gamepad is found at the index, it returns undefined.

Arguments

Controller.getController(index)

Argument Type Description
index Int A controller index.

Example

Controller.getController(0);

>> Controller {}
Clone this wiki locally