- Home /
How do I do left to right movement with ONLY the WASD keys?
I'm trying to make a 2 player game where one person will use the WASD and another person will use the arrow keys. The tutorial uses GetAxisRaw("Horizontal"), but that uses both WASD and Arrows? Is there anyway that I can set it to only use WASD? My current code with only horizontal movement:
Answer by Bunny83 · Apr 28, 2021 at 10:19 AM
The input axes are defined in the input manager. There are several "Horizontal" and "Vertical" axes defined. Also every axis can have a primary and secondard button defined. So you can simply create a new set of axes and set them up as you wish.
Alternatively you can simply use methods like GetKey and manually react to the keys you want.
Your answer
Follow this Question
Related Questions
Unexpected LAG :\ 1 Answer
problem with mapping keys through c# 1 Answer
Multiplayer problem - 2nd player erratic movment? 0 Answers
Help me: Wasd movement, Model following my mouse 0 Answers
Rocket Jumping Woes 1 Answer