Skip to content

Overview

If you need to react to input mode changes, for example to display proper UI icons, then you can use the Input Detection Mapping Context provided by this plugin, along with the appropriate Handler.

Detect Input Mode

Receiving Input Mode Changes

The key to receive input changes is the InputModeAwareInterface, which can be implemented either in Blueprint or C++.

This interface has two functions:

  1. Provide a Gameplay Tag representing the current input mode: GetPlayerInputMode
  2. Receive a Gameplay Tag representing a new input mode: SetPlayerInputMode

Implementing this interface in the Manager's owner will automatically make it eligble to receive Input Mode changes, so it can react accordingly.

Note

Only changes will be broadcast to the interface. Never a repeated mode!

Handling New Input Modes

To support new Input Modes, such as Oculus controllers, do the following:

  1. Copy the Input Actions available from the Plugin, into your project. Look into the Detection folder and copy the Gamepad-related ones.
  2. Copy the Input Detection Mapping Context from the same folder as well.
  3. Modify your Input Actions to track the adequate keys. Keep in mind that the first Input Action (IA_Gamepad) tracks boolean value, while the second one (IA_Gamepad_Axis) tracks 2d axis.
  4. Create a new Gameplay Tag representing the new Input Mode.
  5. Add the new Input Context to the Manager Component.
  6. Expand the Input Detection Handler and, in its map, add the two new Input Actions, and the new Gamplay Tag.