Skip to content

Conversation

@kumaryash6352
Copy link

Objective

Solution

Turn NavNeighbors from storing an array of Option<Entity> to an array of NavNeighbor, an enum with 3 values: Unset (no explicitly set thing in this direction), Blocked (assume there is nothing in this direction to path to), and Neighbor(Entity).

Testing

Changes tested using a new test, test_respects_set_blocks, and manually using the directional_navigation_override example. Second page is restricted to left/right movement, as up/down are blocked.

Showcase

I'm not quite sure how to showcase this, as it's a very input-oriented feature and the feature working means that nothing happens.

Changes get_components_mut to use a Bloom filter before
we do an expensive component-by-component check. Shouldn't
cause any false-positives: false-positives
from the Bloom filter are caught on the expensive check after.
Forgot to respect Write vs. Read accesses.
Changes navigation to use a 3-state enum, distinguishing
between "unset" neighbors, "explicitly removed" neighbors,
and "known" neighbors. Unset neighbors can be overwritten by
auto nav building, while explicitly removed slots cannot.
Documents surprising behavior when inputting a
diagonal direction (ie. `NorthWest`) when
one of the components are blocked (ie. `North`)
@alice-i-cecile
Copy link
Member

Did you mean to close this?

@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-UI Graphical user interfaces, styles, layouts, and widgets labels Jan 21, 2026
@kumaryash6352
Copy link
Author

Yes, sorry. The PR I submitted accidentally contains the commits from #22572, so I am trying to rebase my branch onto current main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-UI Graphical user interfaces, styles, layouts, and widgets C-Feature A new feature, making something new possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants