Skip to content

Fix Warp mouse on Tablet/Trackpad 3D Navigation Scheme#116779

Open
MaxiSanc37 wants to merge 1 commit intogodotengine:masterfrom
MaxiSanc37:warpMouse
Open

Fix Warp mouse on Tablet/Trackpad 3D Navigation Scheme#116779
MaxiSanc37 wants to merge 1 commit intogodotengine:masterfrom
MaxiSanc37:warpMouse

Conversation

@MaxiSanc37
Copy link
Contributor

Fixes_mouse_warp.mp4

(the lag in the video is not reflective of how the engine is running, it's just the windows snipping tool doing some weird cuts on the video).

This fixes #116177 where emulated 3-button navigation (e.g. Alt/Shift + trackpad drag) stopped when the pointer left the 3D viewport. Instead of relying on mouse capture (which hides the cursor), this PR adds an emulated-nav continuation path in Node3DEditorViewport:

  • tracks whether emulated navigation is active,
  • computes active emulated nav mode from current modifier shortcuts,
  • temporarily enables global input() processing while emulated nav is active,
  • applies nav updates from outside-viewport motion there,
  • disables that path when modifiers/nav mode are no longer active.

Inside-viewport motion still uses the existing _sinput() flow, so behavior remains consistent and avoids double-processing.

Changed files

  • node_3d_editor_plugin.h
  • node_3d_editor_plugin.cpp

Testing

  • Emulated 3-button trackpad nav continues when crossing viewport edges.
  • Cursor remains visible.
  • Standard navigation and freelook behavior remain unchanged.

@MaxiSanc37 MaxiSanc37 requested review from a team as code owners February 25, 2026 23:37
Co-authored-by: kateyvk <kateyvk16@gmail.com>
@MaxiSanc37
Copy link
Contributor Author

I accidentally created this feature branch from a previous PR feature branch so there's also the code that was changed for that issue: #115915 so the code insertions for that is included as well, do you want me to remove the changes on that file manually and squashing the commits?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mouse not warp when editors/3d/navigation/navigation_scheme is set to touchpad

1 participant