- Home /
Automatically updating UI navigation directions when menu elements move
I'm currently working on a UI system that involves a 3D UI that can rotate like a cylinder. I want the buttons on the menu that have been rotated to the back to still be appropriately selectable but it seems that Unity doesn't automatically update the navigation directions when I rotate the menu and the selection directions remain based on the starting positions of my button.
For example, if button B starts to the left of button A, you can of course select button B while button A is selected by pressing left. But, if the buttons have been rotated around to the back, the perspective is flipped and you would now need to press right to select button B from button A. Unity doesn't seem to automatically update required input directions though so with a default setup you end up still needing to press left.
I'm aware this is a very pecular UI system so I'm not surprised that it doesn't work as I intended out of the box. Is there any way to set it up to work the way I want it? I would appreciate any help I can get with this, it's my first time asking a question here so hopefully I've appropriately described the issue.
Answer by JillCrungus · Sep 20, 2019 at 05:00 PM
A friend of mine found a solution to this.
Only worry about horizontal movement and not vertical and write our own handler for the input, which just selects the closest element on the X axis that's also in the desired direction. Let Unity handle vertical movement.
Your answer
Follow this Question
Related Questions
GearVR Back Button recognized as a click 0 Answers
Issues implementing UI event triggers via script 1 Answer
Eventsystem requires window focus? 0 Answers
How to handle delays with UI interaction, i.e. while playing an animation 1 Answer
UI - Assigning Event Callbacks Via Script Fails on GameObjects Instantied Via Script 0 Answers