Merge pull request #14846 from carlosfvieira/weird_gizmo_ortho

Fixes gizmo huge scale immediately after change to orthogonal view
This commit is contained in:
Noshyaar 2017-12-25 08:39:08 +07:00 committed by GitHub
commit 5859db00d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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();
}
}