aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgnacio Etcheverry2016-04-07 13:30:40 +0200
committerRémi Verschelde2016-04-27 08:42:01 +0200
commit40d21117f975d007098922dce52cae5800a7f0d1 (patch)
tree1c8ed81d2f4bc2ab369060d6d9717089cac23524
parente120e2265b87e27ed61d6c65c39ca5053f842721 (diff)
downloadgodot-40d21117f975d007098922dce52cae5800a7f0d1.tar.gz
godot-40d21117f975d007098922dce52cae5800a7f0d1.tar.zst
godot-40d21117f975d007098922dce52cae5800a7f0d1.zip
Fix RayCast not updating when debugging collissions
(cherry picked from commit 6cf3bdcf7662218f8f02feb91fa85efedbc1b7b3)
-rw-r--r--scene/2d/ray_cast_2d.cpp2
-rw-r--r--scene/3d/ray_cast.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index 4a774b019..6cda52fa4 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -33,7 +33,7 @@
void RayCast2D::set_cast_to(const Vector2& p_point) {
cast_to=p_point;
- if (is_inside_tree() && get_tree()->is_editor_hint())
+ if (is_inside_tree() && (get_tree()->is_editor_hint() || get_tree()->is_debugging_collisions_hint()))
update();
}
diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp
index ab2c4fc8d..29813597f 100644
--- a/scene/3d/ray_cast.cpp
+++ b/scene/3d/ray_cast.cpp
@@ -33,7 +33,7 @@
void RayCast::set_cast_to(const Vector3& p_point) {
cast_to=p_point;
- if (is_inside_tree() && get_tree()->is_editor_hint())
+ if (is_inside_tree() && (get_tree()->is_editor_hint() || get_tree()->is_debugging_collisions_hint()))
update_gizmo();
}