summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-04-07 14:13:48 +0200
committerRémi Verschelde <remi@verschelde.fr>2016-04-07 14:13:48 +0200
commitb9ac3df29be261f4ec83005415900539ca30a818 (patch)
tree4682f3e87105c20683cf6da7a1ef3c4afcb2c021
parent823e87baeed23d8244fd7e89ef334377f5890be6 (diff)
parent6cf3bdcf7662218f8f02feb91fa85efedbc1b7b3 (diff)
Merge pull request #4259 from neikeq/pr-issue-4224
Fix RayCast not updating when debugging collissions
-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 4a774b0198..6cda52fa4e 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 ab2c4fc8dc..29813597fa 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();
}