Skip to content

Add the ability to cancel pan/zoom/orbit navigation#105791

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
Open-Industry-Project:cancel-navigation
Mar 9, 2026
Merged

Add the ability to cancel pan/zoom/orbit navigation#105791
Repiteo merged 1 commit intogodotengine:masterfrom
Open-Industry-Project:cancel-navigation

Conversation

@ryevdokimov
Copy link
Contributor

Works with right click or escape key.

Demo:

2025-04-26.18-57-35.mp4

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected. Code looks good to me.

Some feedback:

  • When pressing the key/mouse button, navigation is canceled, but the pan/orbit/zoom will still be active. This means that if you move the mouse slightly afterwards, you will still result in some motion, which can be undesired. I think pressing the key/mouse button should exit the mode entirely until you press the key/mouse button that triggers the action again.
    • This is particularly noticeable if you hold Escape while still trying to orbit:
navigation_cancel_hold_escape.mp4

@ryevdokimov
Copy link
Contributor Author

Feedback addressed.

@YeldhamDev
Copy link
Member

YeldhamDev commented Mar 8, 2026

This should also be added to the Game editor as well. Preferably by moving this code to the View3DController class, if possible.

@ryevdokimov ryevdokimov requested a review from a team as a code owner March 8, 2026 23:48
@ryevdokimov
Copy link
Contributor Author

ryevdokimov commented Mar 8, 2026

Done. I promise I'm going to stop forgetting about the game view from now on 😂

2026-03-08.19-47-00.mp4

@YeldhamDev
Copy link
Member

Would be possible to move the code for canceling it to inside the input handling of View3DController? Or would this add too much complexity?

@ryevdokimov
Copy link
Contributor Author

Yeah, it can be done.

@ryevdokimov ryevdokimov requested a review from YeldhamDev March 9, 2026 16:28
Copy link
Member

@YeldhamDev YeldhamDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Repiteo Repiteo modified the milestones: 4.x, 4.7 Mar 9, 2026
@Repiteo Repiteo merged commit 88cd7ab into godotengine:master Mar 9, 2026
20 checks passed
@github-project-automation github-project-automation bot moved this from For team assessment to Merge Ready in Usability Team Review Tracker Mar 9, 2026
@Repiteo
Copy link
Contributor

Repiteo commented Mar 9, 2026

Thanks!

@ryevdokimov ryevdokimov deleted the cancel-navigation branch March 9, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Merge Ready

Development

Successfully merging this pull request may close these issues.

6 participants