- Home /
How to use a controller button and keyboard key?
I am using Unity's FPS Controller and have mapped my controller so it looks around and jumps and all that, but one thing is that I CANNOT use the SHIFT key while trying to run. I can use the X button (PS3 controller) to jump and the L1 button to run, but I can't run with the shift button on my keyboard. This is the code that I used, well just added to.
m_IsWalking = !Input.GetKey(KeyCode.LeftShift);
m_IsWalking = !Input.GetButton("PS3_X"); //this is the part that I added so that it runs with L1 on controller
now the SHIFT key works when I delete that second line of code, but it doesn't when I put it in. Any ideas or anything please. I'll be as clear as possible. Thanks in advance
Your answer
Follow this Question
Related Questions
Multiple controller buttons Xbox 360 & PS3 different controllers 1 Answer
Is it possible to set up multiple controllers without writing each one out in the Input Manager? 1 Answer
How many inputs in Unity's Input Manager is considered bad? 0 Answers