From 915865b2797e6c49e01173a7db386618fba38c39 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 23 May 2021 19:50:53 +0200 Subject: [PATCH] Fix editor constantly redrawing when freelook is active with still camera The editor only needs to redraw when the camera is moving. This helps preserver battery life on laptops when using freelook, especially with the toggle mode (Shift + F). (cherry picked from commit 21807f8d883a3a276bea990c9349e0417caf46f6) --- editor/plugins/spatial_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 74d39fc7ea0..ce7a4f28f7b 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -341,7 +341,7 @@ void SpatialEditorViewport::_update_camera(float p_interp_delta) { equal = false; } - if (!equal || p_interp_delta == 0 || is_freelook_active() || is_orthogonal != orthogonal) { + if (!equal || p_interp_delta == 0 || is_orthogonal != orthogonal) { camera->set_global_transform(to_camera_transform(camera_cursor)); if (orthogonal) {