summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-08-30 20:19:00 +0200
committerGitHub <noreply@github.com>2018-08-30 20:19:00 +0200
commit2881a8e431308647fde21f9744b81269d0323922 (patch)
treeead85e825853de17f1a7c52bb1838d0f7f28ebe1 /scene/2d
parenta1019c2c82f786cb5f2f1b59bbe5e28f93573a88 (diff)
parent449fcc5a72ee09b942c4744d8a7ac77df7fe8908 (diff)
Merge pull request #21597 from akien-mga/raycast2d-clear-collider
RayCast2D: Fix reporting old collider after collision ended
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/ray_cast_2d.cpp2
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;
}
}