Buttons with explicit navigation are Y-inverted?
Hello, I'm trying to create a simple 2D UI menu consisting of several buttons within a vertical layout group. For some reason, when I set the Navigation property of the Button script to Automatic, Vertical, or even Explicit (specifying "Select On Up" and "Select On Down" to the buttons above and below respectively), the selection moves in the wrong direction. When I press down on the gamepad, the selection moves up, and when I press up the selection moves down. I tested and left/right are not inverted, they work as expected.
Now, to work around this I know I can simply reverse "Select On Up" and "Select On Down" but I'd rather get it working the way it is supposed to. Does anyone know what might be causing this?
Answer by RobDiazMarino · Dec 23, 2016 at 01:26 AM
So it turns out I was inverting Y-axis input for player movement in my scripts, which wasn't aligning with Unity's built-in logic for button navigation. So what I ended up doing was inverting the Y-axis for the left and right sticks in the input manager and fixing my player controller so it no longer inverts the Y-axis. So now the buttons navigate correctly and my player movement is still correct too.
Your answer
Follow this Question
Related Questions
Navigation through buttons with custom controller logic 0 Answers
Detecting joystick disconnect 2 Answers
How to sprint with the Standard Asset FPS Controller with a Controller/Gamepad 0 Answers
Gamepad rumble independent motors 0 Answers
make a self-driving car, combine Navimesh and waypoint? 1 Answer