Skip to main content
  1. Articles/

Adding Keyboard control to TopDown Game Mode

·190 words·1 min
Table of Contents
1. Create the Input Action>

1. Create the Input Action #

The first step is to create an Input Action for character movements. In the Content\TopDown\Input\Actions folder create a new Input Action names IA_Move and set the Consume Input field to True, you also want to set the Value Type to Axis2D (Vector2D)

IA Configuration
IA_Move configuration

2. Update Input Mapping Context (or create a new one)>

2. Update Input Mapping Context (or create a new one) #

In order to ensure your character can move, you need to create or update the Input Mapping Context that comes with the mode. The default one should be located in Content\TopDown\Input.

Open the IMC_Default and add the following elements:

IMC content
updated Input Mapping Context

3. Update your Controller Blueprint>

3. Update your Controller Blueprint #

The final step is to update your BP_TopDownController blueprint located in Content\TopDown\Blueprints

The easiest step to implement this is to use the EnhancedInputAction_IA_Move from third person starter content and update the targets of the AddMovementInput to be the Character blueprint you’re using (you can also recreate it entirely from the screenshot below)

BP_TopDownController
BP_TopDownController Movement Input

And voila, easy peasy :)