Creating Custom Player Inputs

Create a new set of InputActions.

I’ve called these TwinStickControls

Open the InputActions

Create a Control Scheme.

Click No Control Schemes and then Add Control Scheme.

Add Keyboard and Gamepad.

Add an Action Map for the Player.

Also check Auto Save Asset

First we will get our player moving.

Add an Action using the + called Move

Change the Action Type to Value with a Control Type of Vector2.

This allows us to set what data type the input will be.

We want to register x and y input using WASD or the Left Gamepad stick.

Now click on the <No Binding> and edit the Binding Properties.

We are going to link this to Left Gamepad first.

Now click the + to add another binding.

Select Composite. This allows for using multiple keys of buttons at once.

Rename it WASD or Keyboard

Add in WASD for Up, Left, Down, and Right respectively.

You might also like