-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
What problem does this solve or what need does it fill?
bevy_input_focus's directional navigation ignores scaling and rotation of nodes by their UiTransform.
Consider this example:
The black node is our current input focus.
The red node's orientation in the layout generated by Taffy is horizontal (represented by the dashed rectangle) but its UI transform has a rotation giving it a vertical orientation (represented by the solid rectangle). The user sees the red node occupying the position of the solid red rectangle. But the directional navigation plugin ignores its UI transform and builds the navigation tree as though the red node is in it's dashed position.
So the user sees that green node is directly above the input focused black node and when they press the up cursor key they'd expect the input focus to move to the green node, but they reach the red node instead. In the same way, pressing right will move input focus from the black node to the blue node, even though it appears that the red node is between them.
What solution would you like?
Directional navigation should consider the node’s final transformed geometry as seen by the user, rather than the untransformed geometry produced by Taffy.