浏览代码

Fix RayCast not updating when debugging collissions

Ignacio Etcheverry 9 年之前
父节点
当前提交
6cf3bdcf76
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      scene/2d/ray_cast_2d.cpp
  2. 1 1
      scene/3d/ray_cast.cpp

+ 1 - 1
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();
 
 }

+ 1 - 1
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();
 
 }