summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/camera.cpp3
-rw-r--r--scene/3d/light.cpp2
-rw-r--r--scene/3d/visibility_notifier.cpp1
3 files changed, 3 insertions, 3 deletions
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp
index bbc81afe3d..289dc0ba07 100644
--- a/scene/3d/camera.cpp
+++ b/scene/3d/camera.cpp
@@ -390,10 +390,9 @@ Vector3 Camera::project_position(const Point2 &p_point, float p_z_depth) const {
ERR_FAIL_COND_V_MSG(!is_inside_tree(), Vector3(), "Camera is not inside scene.");
- if (p_z_depth == 0) {
+ if (p_z_depth == 0 && mode != PROJECTION_ORTHOGONAL) {
return get_global_transform().origin;
}
-
Size2 viewport_size = get_viewport()->get_visible_rect().size;
CameraMatrix cm;
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index bb6f3aab33..593d0b95b7 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -103,6 +103,8 @@ void Light::set_color(const Color &p_color) {
color = p_color;
VS::get_singleton()->light_set_color(light, p_color);
+ // The gizmo color depends on the light color, so update it.
+ update_gizmo();
}
Color Light::get_color() const {
diff --git a/scene/3d/visibility_notifier.cpp b/scene/3d/visibility_notifier.cpp
index 14c4d306d1..510442dc1c 100644
--- a/scene/3d/visibility_notifier.cpp
+++ b/scene/3d/visibility_notifier.cpp
@@ -240,7 +240,6 @@ void VisibilityEnabler::_node_removed(Node *p_node) {
if (!visible)
_change_node_state(p_node, true);
- p_node->disconnect(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed");
nodes.erase(p_node);
}