Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic UI focus navigation regularly skips nodes when using controller on macOS #103898

Closed
AdriaandeJongh opened this issue Mar 10, 2025 · 14 comments · Fixed by #104314
Closed

Comments

@AdriaandeJongh
Copy link
Contributor

AdriaandeJongh commented Mar 10, 2025

Tested versions

  • Reproducible in 4.4-stable
  • Not reproducible in 4.3-stable

System information

Godot v4.4.stable - macOS Sequoia (15.3.1) - Multi-window, 2 monitors - Metal (Mobile) - integrated Apple M3 Max (Apple9) - Apple M3 Max (14 threads)

Issue description

Automatic UI focus navigation regularly skip nodes when using controller. I've made an MRP to help debug this issue. I also made a video below showing the faulty behavior at:

  • 0:04 (horizontal left)
  • 0:10 (horizontal left)
  • 0:20 (diagonally down left)
  • 0:29 (diagonally up right like a horse in chess)
Screen.Recording.2025-03-10.at.11.14.00.mp4

Steps to reproduce

  1. Open and run MRP.
  2. Use a controller joystick to navigate the grid buttons.

Minimal reproduction project (MRP)

focus-mrp2.zip

@AdriaandeJongh
Copy link
Contributor Author

May be related to #103895, but seemed distinct enough for me to make two issue reports.

@Rindbee
Copy link
Contributor

Rindbee commented Mar 10, 2025

Do you use the D-pad keys or the axes for control?

@AdriaandeJongh
Copy link
Contributor Author

I used the controller joysticks, so axis.

@Rindbee
Copy link
Contributor

Rindbee commented Mar 10, 2025

This may be an issue about the controller.

@AdriaandeJongh
Copy link
Contributor Author

Yeah maybe! I've reproduced this on macOS with a wired Xbox controller, a PS4 controller, and an 8BitDo Pro 2 controller. Especially the PS4 controller was displaying this issue, sometimes skipping even 2 or 3 buttons:

Screen.Recording.2025-03-10.at.12.06.18.mp4

My colleague on Windows can't reproduce it, but it would be great if others on Windows and Linux could try it so we can pinpoint this to the improvements controller support on macOS for 4.4.

@Rindbee
Copy link
Contributor

Rindbee commented Mar 10, 2025

If you can reproduce it with keyboard and controller buttons, then it is most likely a focus issue.

I remember seeing a related issue report, but I can't find it yet.

@AdriaandeJongh
Copy link
Contributor Author

I cannot reproduce it with keyboard or the dpad on controller, so then according to your logic it is a controller input issue. Perhaps on macOS the ui_* [up / down / left / right] is triggered multiple times? I'm just spitballing here.

@Rindbee
Copy link
Contributor

Rindbee commented Mar 10, 2025

Possibly related issues: #54959, #73241, #35751

@AdriaandeJongh
Copy link
Contributor Author

I just tested this in Godot 4.3 and it shows the correct behavior there, meaning this is a regression from 4.3.

If this is a regression from changes between 4.3 and 4.4, and only applicable on macOS, and only related to controller, then @stuartcarnie's rewrite of the macOS controller stuff is only PR I could find that may have introduced this, unless there's some other platform specific stuff I couldn't find.

@Rindbee
Copy link
Contributor

Rindbee commented Mar 10, 2025

Can you still reproduce it after manually specifying focus_neighbor_*? If it still occurs, it may be a controller-related issue.

@AdriaandeJongh
Copy link
Contributor Author

Good question! It does still happen when I enter the focus neighbors. So this is increasingly looking to be a controller-related issue.

@matheusmdx matheusmdx added this to the 4.5 milestone Mar 11, 2025
@akien-mga akien-mga changed the title Automatic UI focus navigation regularly skips nodes when using controller Automatic UI focus navigation regularly skips nodes when using controller on macOS Mar 17, 2025
@akien-mga
Copy link
Member

CC @stuartcarnie @bruvzg

@akien-mga akien-mga moved this from Unassessed to Bad in 4.x Release Blockers Mar 17, 2025
@bruvzg
Copy link
Member

bruvzg commented Mar 18, 2025

I can reproduce it with analog stick (but not the d-pad).

@bruvzg bruvzg self-assigned this Mar 18, 2025
@bruvzg
Copy link
Member

bruvzg commented Mar 18, 2025

Seems like the issue happens when multiple events are sent during the same physics frame. Not sure if it's macOS only issue.

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