You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Fix ViewPanner panning mouse warp
Currently the mouse cursor jumps in unexpected ways, when a `ViewPanner` is used in SubViewports or embedded Windows. This is caused by providing wrong coordinate systems to Input::warp_mouse_motion. This PR replaces the use of `Input::warp_mouse_motion` with `Viewport::wrap_mouse_in_rect` and makes sure, that the correct coordinate systems are used. This change makes it necessary, that all classes, that currently use ViewPanner, need to provide the correct Viewport to ViewPanner.
This commit is contained in:
@@ -5188,6 +5188,7 @@ void VisualShaderEditor::_notification(int p_what) {
|
||||
}
|
||||
|
||||
graph->get_panner()->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/sub_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
|
||||
graph->get_panner()->set_viewport(get_viewport());
|
||||
graph->set_warped_panning(bool(EDITOR_GET("editors/panning/warped_mouse_panning")));
|
||||
} break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user