Skip to content

Commit

Permalink
Merge pull request #86511 from Sauermann/fix-drag-transform
Browse files Browse the repository at this point in the history
Fix D&D viewport position calculation
  • Loading branch information
akien-mga committed Jan 2, 2024
2 parents a1d4585 + 4b6516c commit 60b2096
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
Window *w = Object::cast_to<Window>(ObjectDB::get_instance(object_under));
if (w) {
viewport_under = w;
viewport_pos = screen_mouse_pos - w->get_position();
viewport_pos = w->get_final_transform().affine_inverse().xform(screen_mouse_pos - w->get_position());
}
}
}
Expand Down

0 comments on commit 60b2096

Please sign in to comment.