summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorNoshyaar <poommetee@protonmail.com>2017-12-25 08:39:08 +0700
committerGitHub <noreply@github.com>2017-12-25 08:39:08 +0700
commit5859db00d8b3820356f978cb66163875f8bc1c11 (patch)
treee0cf278a0c9dc38831e372585acb49580b6f931a /editor/plugins
parent24515266a174cc827d9f7bfc4fe9a4494fbddc41 (diff)
parent2a3f6ee8b3d763f711470f633df785331438bd74 (diff)
Merge pull request #14846 from carlosfvieira/weird_gizmo_ortho
Fixes gizmo huge scale immediately after change to orthogonal view
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 59da5112ae..f0501d9d63 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -153,13 +153,14 @@ void SpatialEditorViewport::_update_camera(float p_interp_delta) {
if (!equal || p_interp_delta == 0 || is_freelook_active() || is_orthogonal != orthogonal) {
camera->set_global_transform(to_camera_transform(camera_cursor));
- update_transform_gizmo_view();
if (orthogonal) {
//camera->set_orthogonal(size.width*cursor.distance,get_znear(),get_zfar());
camera->set_orthogonal(2 * cursor.distance, 0.1, 8192);
} else
camera->set_perspective(get_fov(), get_znear(), get_zfar());
+
+ update_transform_gizmo_view();
}
}