Directional navigation is a little too permissive
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version and features
0.20-dev
## What you did
I've been working with hooking up directional navigation to a game controller. This screenshot shows the configuration I am working with:
As you can see, in this case the "Save" button has focus. If I then navigate RIGHT, selection goes to the "Confirm" button. While it's true that this is the only button to the right of "Save", the behavior is surprising.
I'm using the automatic navigation method, not explicit directional links.
## What went wrong
I think the algorithm is trying to be conservative; it want to make sure that there are no cases where the player can't get to a control because a spatial search failed. But in this particular case, failing to find a control to the "right" is what I would expect.
@alice-i-cecile @kfc35
Contributor guide
Research direction
Reproduce the automatic directional-navigation setup described in the issue, using the Save and Confirm controls and a right-navigation input. Start by locating the automatic spatial-search navigation entry point in Bevy's UI navigation code. Done means navigating right from Save does not select Confirm when no suitable right-hand control exists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100