diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-08-30 16:28:48 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-08-30 16:28:48 +0200 |
commit | 449fcc5a72ee09b942c4744d8a7ac77df7fe8908 (patch) | |
tree | e51a42a19351b6fe86102c6c5fa81d4cbfa535d5 /scene | |
parent | 9e43129906b87f10314406a93b9f8badbe5aae76 (diff) |
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.
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/ray_cast_2d.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; } } |