diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp index 556774a0d1a..dd5ae8a9994 100644 --- a/scene/3d/ray_cast.cpp +++ b/scene/3d/ray_cast.cpp @@ -217,6 +217,8 @@ void RayCast::_update_raycast_state() { against_shape = rr.shape; } else { collided = false; + against = 0; + against_shape = 0; } }