1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +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.
This commit is contained in:
JFonS
2020-04-28 16:41:01 +02:00
parent b62218bbac
commit 051f02a3a0
2 changed files with 11 additions and 3 deletions

View File

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