diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-05-12 22:13:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-12 22:13:08 +0200 |
commit | b283447bfd5c8d1f6a6566bda57f89c1b87a3e0e (patch) | |
tree | 93ea03e0bd41227d69d2e5265622e031fb974467 | |
parent | 0c693f878147d6c1e1a5fc48a92a40b189c915ad (diff) | |
parent | 41994ff8ee0af0bf826ede93e6e9931109f0dede (diff) |
Merge pull request #47348 from nekomatata/raycast-3d-collide-fix
Fix RayCast3D color in game with no collision
-rw-r--r-- | scene/3d/ray_cast_3d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/ray_cast_3d.cpp b/scene/3d/ray_cast_3d.cpp index 95638ce514..475f8c07fd 100644 --- a/scene/3d/ray_cast_3d.cpp +++ b/scene/3d/ray_cast_3d.cpp @@ -428,7 +428,7 @@ void RayCast3D::_update_debug_shape_material(bool p_check_collision) { color = get_tree()->get_debug_collisions_color(); } - if (p_check_collision) { + if (p_check_collision && collided) { if ((color.get_h() < 0.055 || color.get_h() > 0.945) && color.get_s() > 0.5 && color.get_v() > 0.5) { // If base color is already quite reddish, highlight collision with green color color = Color(0.0, 1.0, 0.0, color.a); |