- Home /
How to set up two character controllers on one client?
I am making a 2D fighting game when both players play on the same machine. I have 1 controller working easy, but how do I set up the second one, so that one characters checks the WASD for movement, while the other checks the arrow keys?
Thanks a lot!
Answer by efge · Mar 21, 2011 at 06:36 PM
You should not use Input.GetAxis but Input.GetKey instead, e.g.:
Input.GetKey (KeyCode.UpArrow) for player one and Input.GetKey (KeyCode.W) for player two.
(Input.GetAxis is by default mapped in the Input Manager to the WASD and Arrow buttons.)
Your answer
Follow this Question
Related Questions
Can someone help my character move correctly? 0 Answers
Character constant movement 2D... 1 Answer
How do I use the Standard Asset 2D character controller for a local multiplayer game? 2 Answers
How to let a GameObject generate force but not be affected by certain forces? 0 Answers
SimpleMove not working on Y axis? 1 Answer