crystal.input.unassign_gamepad

Unassigns a player’s current gamepad. Gamepad button presses will no longer be tracked by this player’s InputPlayer.

In addition:

  • This method puts all inputs for the affected player in a released state.
  • If the player’s input method was gamepad, it is set to nil.

This method has no effect if the player had no assigned gamepad.

Usage

crystal.input.unassign_gamepad(player_index)

Arguments

Name Type Description
player_index number Number identifying a player.

Examples

local player_index = 1;
crystal.input.unassign_gamepad(player_index);

This site uses Just the Docs, a documentation theme for Jekyll.