From 449fcc5a72ee09b942c4744d8a7ac77df7fe8908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 30 Aug 2018 16:28:48 +0200 Subject: RayCast2D: Fix reporting old collider after collision ended It now behaves the same as RayCast (3D). Fixed documentation accordingly and documented new configuration options. Supersedes and closes #20567. --- scene/2d/ray_cast_2d.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scene/2d') diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp index 9582c08110..d9b3cb07fc 100644 --- a/scene/2d/ray_cast_2d.cpp +++ b/scene/2d/ray_cast_2d.cpp @@ -218,6 +218,8 @@ void RayCast2D::_update_raycast_state() { against_shape = rr.shape; } else { collided = false; + against = 0; + against_shape = 0; } } -- cgit v1.2.3