From ac6d5dc66ebb3485a4e7b5ffe3d5ad214569b76e Mon Sep 17 00:00:00 2001 From: jfisher993 Date: Tue, 28 Feb 2017 16:41:36 -0500 Subject: [PATCH] Update Controller2D.cs --- Platformer E10/Assets/Scripts/Controller2D.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Platformer E10/Assets/Scripts/Controller2D.cs b/Platformer E10/Assets/Scripts/Controller2D.cs index 0101b6f0..162f9bbb 100644 --- a/Platformer E10/Assets/Scripts/Controller2D.cs +++ b/Platformer E10/Assets/Scripts/Controller2D.cs @@ -115,7 +115,11 @@ void VerticalCollisions(ref Vector3 velocity) { continue; } if (collisions.fallingThroughPlatform) { - continue; + if (hit.distance < skinWidth) { + continue; + } else { + collisions.fallingThroughPlatform = false; + } } if (playerInput.y == -1) { collisions.fallingThroughPlatform = true;