- Home /
Controller Button Issues
Hello,
I am currently working on a 2D Platformer and I am currently working on adding controller support. Although the controller has been added, I am experiencing some issues with how the buttons work.
In my game, when in the Unity Engine I can press Circle (B on Xbox controller) to sprint and X (A on Xbox controller) to jump, which is how I want the game to work. Yet when I test out the game as a separate build I need to press Square (X on Xbox) to sprint and Circle to jump. Does anyone know why this is and how it can be fixed?
I use DS4 to pair my controller to my PC, if that helps. A (simplified) segment of my code is also attached below
if (Input.GetKey(KeyCode.Joystick1Button1))
{
//jump
}
if (Input.GetKey(KeyCode.Joystick1Button2))
{
//sprint
}
Thank you in advance for any help.
[I'm sorry if this has been answered before, I've been searching for various days yet have not found an answer which fits in with my problem, hence decided ask my own]
Your answer
Follow this Question
Related Questions
In my 2D platformer game, how would I create a height marker?, 1 Answer
Level design clone of King of Thieves 0 Answers
Problem with Falling Platform Script 3 Answers
Problem with 2D movement. My character is moving by himself between two points... :) 1 Answer
so I'm trying to make a 2D platform but the first animation i make is the only one that registers 0 Answers