L
L
LittleBob2022-01-09 18:05:38
Unity
LittleBob, 2022-01-09 18:05:38

How to remove reading from the arrow buttons in Input.GetAxisRaw?

Player movement script

rb.velocity = new Vector2(Input.GetAxisRaw("Horizontal") * speed, Input.GetAxisRaw("Vertical") * speed);

The problem is that it works for both WASD and arrow keys. How to remove the reading of the arrows? I need the player to move only in WASD.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LittleBob, 2022-01-09
@LittleBob

Found a solution in Edit, Project Settings, Input Manager.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question