X Tutup
Skip to content

Fix viewport orbit snap defaulting to always snapping when shortcut(s) are set to none#115002

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
Open-Industry-Project:orbit-snap-require-shortcut
Feb 5, 2026
Merged

Fix viewport orbit snap defaulting to always snapping when shortcut(s) are set to none#115002
Repiteo merged 1 commit intogodotengine:masterfrom
Open-Industry-Project:orbit-snap-require-shortcut

Conversation

@ryevdokimov
Copy link
Contributor

Fixes: #114997

@ryevdokimov ryevdokimov requested a review from a team January 15, 2026 18:04
@ryevdokimov ryevdokimov force-pushed the orbit-snap-require-shortcut branch from 6173479 to 7b2b3b4 Compare January 15, 2026 18:06
@AThousandShips AThousandShips added bug topic:editor topic:3d cherrypick:4.6 Considered for cherry-picking into a future 4.6.x release labels Jan 15, 2026
@AThousandShips AThousandShips added this to the 4.x milestone Jan 15, 2026
@akien-mga
Copy link
Member

Isn't it weird that _is_nav_modifier_pressed returns true if a shortcut is undefined? That sounds like a recipe for issues such as this one, it's counterintuitive with regard to the name of the helper method.

@ryevdokimov
Copy link
Contributor Author

ryevdokimov commented Jan 15, 2026

Isn't it weird that _is_nav_modifier_pressed returns true if a shortcut is undefined?

I agree, although the reasoning for it, is somewhat explained in the OP of #85331:

I wanted to use just one modifier for each operation, but due to a bug (or intended behavior?) in InputEventKey modifiers, pressing a modifier with it's "main" key and then releasing the modifier will still count the button as being pressed. This Reddit post explains it best I think. Another benefit of 2 modifiers is being able to set 2 different "standard" keys like Z/X as opposed to being limited to CTRL, ALT, etc.

As long as two slot system is used, if one is undefined, that one needs to act as pressed if the other one is pressed. It seems like possibly that whole system is due for a review. Given that it was intentional, changing it at this point would probably a breaking change until how shortcuts are handled in general is reworked to handle these scenarios.

@ryevdokimov
Copy link
Contributor Author

ryevdokimov commented Feb 4, 2026

It seems like possibly that whole system is due for a review.

For example: #115776

I'll probably take a look at it more in-depth at some point, but this PR should be fine to resolve the regression.

@akien-mga
Copy link
Member

Also worth noting, we're apparently lacking feature parity between the editor viewport and the runtime debugger / game window when it comes to navigation mode preferences. I believe @YeldhamDev intends to refactor things to be able to reuse that logic in both, but I agree that some de-spaghettifying of the navigation/modifiers code could be worth doing first.

@Repiteo Repiteo merged commit fb9711a into godotengine:master Feb 5, 2026
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Feb 5, 2026

Thanks!

@Repiteo
Copy link
Contributor

Repiteo commented Feb 6, 2026

Cherry-picked for 4.6.1.

@ryevdokimov ryevdokimov deleted the orbit-snap-require-shortcut branch February 6, 2026 14:43
rivie13 pushed a commit to rivie13/Phoenix-Agentic-Engine that referenced this pull request Feb 16, 2026
…uire-shortcut

Fix viewport orbit snap defaulting to always snapping when shortcut(s) are set to none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug cherrypick:4.6 Considered for cherry-picking into a future 4.6.x release topic:editor topic:3d

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Viewport Orbit Snap Modifier key conflicts with Modo navigation scheme, and is still active after deletion in Editor Settings

4 participants

X Tutup