From 6cf3bdcf7662218f8f02feb91fa85efedbc1b7b3 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Thu, 7 Apr 2016 13:30:40 +0200 Subject: [PATCH] Fix RayCast not updating when debugging collissions --- scene/2d/ray_cast_2d.cpp | 2 +- scene/3d/ray_cast.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp index 4a774b0198d..6cda52fa4ec 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 ab2c4fc8dce..29813597fa1 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(); }