Configure Input Handlers
Configure Ninja Input and replace the default configuration from a project, such as the Third Person Template, so it will use Input Handlers and an Input Setup.
Follow the steps from the Setup page. In this guide, we will add the Input Manager Component to the Player Controller.
Set your Player Controller to your Game Mode either in your Level Details, or in your Maps and Modes page in the Project Settings.
Open your Project Settings, navigate to Enhanced Input and make sure that there are no Default Mapping Contexts.
Navigate to your Character Blueprint, open it and go to the Event Graph.
Remove all input-related nodes, including the ones connected to Begin Play.
In the Content Browser, navigate to your Input folder.
Right click to open the Context Menu, navigate to the Input category and select Ninja Input Setup. Name it in a way that it correlates with your Input Mapping Context, for example:
IMC_Gameplay
→IS_Gameplay
.Open the new Input Setup and add your Input Mapping Context.
Add three new entries to the Input Handlers list, selecting:
Character: Move
,Character: Look
andCharacter: Jump
.For each one of these entries, expand their properties and add the appropriate Input Action.
By default, they will have Input Actions starting with
IA_NI
, which are the ones provided by Ninja Input. Make sure to replace them with their counterparts, provided by the project.
tip
If you get a Validation Error while saving your Input Setup, it means that there are Input Actions in your Input Mapping Context that are missing in the list of Input Handlers.
Check the Message Log Window and you will find which Input Actions are missing an Input Handler. And you can always separate your inputs into multiple setups.