1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Keep mouse inside 3D viewport rotation widget

Hide and keep the mouse in place when the user oribts the scene via the 3D
rotation widget.

(cherry picked from commit 051f02a3a0)
This commit is contained in:
JFonS
2020-04-28 16:41:01 +02:00
committed by Rémi Verschelde
parent 683e19306e
commit 9828c6bc86
2 changed files with 11 additions and 2 deletions

View File

@@ -158,6 +158,7 @@ class ViewportRotationControl : public Control {
SpatialEditorViewport *viewport = nullptr;
Vector<Color> axis_colors;
Vector<int> axis_menu_options;
Vector2i orbiting_mouse_start;
bool orbiting = false;
int focused_axis = -2;