.. _api_PlayerInput: PlayerInput =========== Inherited: :ref:`NativeBehaviour` .. _api_PlayerInput_description: Description ----------- Note: A PlayerInput controller simplifies the management of the player control scheme. It can be used to get the current state of actions from the assigned ControlScheme. .. _api_PlayerInput_public: Public Methods -------------- +--------------------------------------------+----------------------------------------------------------------------------+ | float | :ref:`axis` (const TString & name) | +--------------------------------------------+----------------------------------------------------------------------------+ | bool | :ref:`button` (const TString & name) | +--------------------------------------------+----------------------------------------------------------------------------+ | :ref:`ControlScheme` * | :ref:`controlScheme` () const | +--------------------------------------------+----------------------------------------------------------------------------+ | void | :ref:`setControlScheme` (ControlScheme * scheme) | +--------------------------------------------+----------------------------------------------------------------------------+ .. _api_PlayerInput_static: Static Methods -------------- None .. _api_PlayerInput_methods: Methods Description ------------------- .. _api_PlayerInput_9edc341b: float **PlayerInput::axis** (:ref:`TString` & *name*) Returns the value of the virtual axis identified by name. The value will be in the range -1...1 for keyboard and joystick input devices. ---- .. _api_PlayerInput_e6c019d5: bool **PlayerInput::button** (:ref:`TString` & *name*) Returns true in case of virtual button identified by *name* is pressed; otherwise returns false. ---- .. _api_PlayerInput_1306dba2: :ref:`ControlScheme` * **PlayerInput::controlScheme** () const Returns the current assigned control scheme. **See also** setControlScheme(). ---- .. _api_PlayerInput_31c5bfa8: void **PlayerInput::setControlScheme** (:ref:`ControlScheme` * *scheme*) Assigns a new control scheme. All previous bindings and key states will be cleaned. **See also** controlScheme().