- Home /
How to change control keys
Ok, so... I am experimenting with Unity standard assets, and I want to know how to change the car controls from WASD to the arrow keys. It would be a lot of help if you could give me a script to paste, or at least tell me where to change things! Thank you!
Ok, so, it IS very helpful to know that I can go to input and change the inputs. However, I am trying to make a multiplayer game, not just single player. So, basically, I need one car to use wasd, and one car to use the arrows. Thanks for what's here so far though!
Answer by DroidifyDevs · Jan 14, 2016 at 10:51 AM
Go to Edit> project settings > input
There you can change the keys. If you are calling the keys manually in a script, then do that OG23 told you.
Don't forget to mark the best answer, and next time Bing or Google your question as I found the same thing here: http://answers.unity3d.com/questions/11681/how-do-you-change-key-map-arrow-keys-wsad-etc.html
Not only does it help the community, but it also benefits you as you can get an answer in 10 seconds and not have to waste time posting and waiting on UA.
Good luck coding and gaming!
Answer by hulahoolgames · Jan 14, 2016 at 12:39 AM
If they are using KeyCode to find the WASD then just replace KeyCode.A with KeyCode.LeftArrow, KeyCode.D with KeyCode.RightArrow, KeyCode.W with KeyCode.UpArrow and KeyCode.S with KeyCode.DownArrow in the code. Hope this helps!
Answer by rob5300 · Jan 14, 2016 at 10:31 AM
I assume the Unity standard assets reference Input.GetAxis()
or Input.GetButton()
, rather than referencing specific keys. If this is true you can just change the assigned keys in the Input settings in editor. Alter the default movement keys to what you wish to use and test.
Where to change input settings: http://docs.unity3d.com/Manual/class-InputManager.html Input.GetAxis api reference: http://docs.unity3d.com/ScriptReference/Input.GetAxis.html