summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-12-19 20:33:00 +0100
committerYuri Sizov <yuris@humnom.net>2023-12-19 20:33:00 +0100
commit252c462a9d14befe19d5a9e8774fd71f91ac1bb3 (patch)
tree13b7dc1cc969e59dc6ccf440162a2a695037403e
parent4d695985c18794570080fbd3d3ddba50c69c310e (diff)
parent5b5ac92de57bd60cc8d1f2178e41eb05392d11b5 (diff)
downloadredot-engine-252c462a9d14befe19d5a9e8774fd71f91ac1bb3.tar.gz
Merge pull request #85594 from addmix/camera3d-current-bug
Prevent `Camera3D.current` from being set to `true` automatically in the editor.
-rw-r--r--scene/3d/camera_3d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp
index 8dc17a1c62..c66d9bd2c9 100644
--- a/scene/3d/camera_3d.cpp
+++ b/scene/3d/camera_3d.cpp
@@ -272,7 +272,7 @@ void Camera3D::clear_current(bool p_enable_next) {
if (get_viewport()->get_camera_3d() == this) {
get_viewport()->_camera_3d_set(nullptr);
- if (p_enable_next) {
+ if (p_enable_next && !Engine::get_singleton()->is_editor_hint()) {
get_viewport()->_camera_3d_make_next_current(this);
}
}