Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix trackball when use local space is enabled

ryevdokimovd92a1acc3697
diff --git a/editor/scene/3d/node_3d_editor_plugin.cpp b/editor/scene/3d/node_3d_editor_plugin.cpp
index 7d35d2fac58..dc8deed5ab4 100644
--- a/editor/scene/3d/node_3d_editor_plugin.cpp
+++ b/editor/scene/3d/node_3d_editor_plugin.cpp
@@ -6243,7 +6243,8 @@ void Node3DEditorViewport::commit_transform() {
void Node3DEditorViewport::apply_transform(Vector3 p_motion, double p_snap) {
// View-plane translate/scale always uses global coords; rotation and axis operations respect local/global preference.
bool local_coords = spatial_editor->are_local_coords_enabled() &&
- !(_edit.plane == TRANSFORM_VIEW && _edit.mode != TRANSFORM_ROTATE);
+ !(_edit.plane == TRANSFORM_VIEW && _edit.mode != TRANSFORM_ROTATE) &&
+ !_edit.is_trackball;
bool is_global_view_plane = (_edit.plane == TRANSFORM_VIEW) &&
((_edit.mode != TRANSFORM_ROTATE) || !spatial_editor->are_local_coords_enabled());