bevyengine / bevyengine/bevy

`bevy_input_focus`: Support for navigation in arbitrary directions

Open
#22,233 0 comments 0 reactions 0 assignees View on GitHub
A-UI C-Feature D-Complex S-Ready-For-Implementation X-Uncontroversial
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

At the moment directional navigation only supports navigation in eight directions using the `CompassOctant` enum.
But games often have have skill trees and radial menus navigable with analogue sticks in more than eight directions.
Hexagonal maps are also common in games and five directional navigation doesn't map well onto `CompassOctant`.

## What solution would you like?

The neighbours map should support any number of destinations, perhaps by holding a map from a set of disjoint direction ranges to neighbours. Then given a `Dir2` it would find the containing range and map it to a destination.

The API could still allow use of `CompassOctant` but it would be mapped internally to `Dir2`s.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.