From 8e9bfbf3e129eeee86dbb19cfddb7220ecca00cb Mon Sep 17 00:00:00 2001 From: Abdullah Hashim Date: Sat, 11 Jan 2020 01:50:13 +0300 Subject: [PATCH] Fix getting stuck with moving platform issue assigning a moving platform layer mask, the player gets stuck when trying to get up/down slopes. thanks to @AlexAdvani --- Assets/PC2D/Scripts/PlatformerMotor2D.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/PC2D/Scripts/PlatformerMotor2D.cs b/Assets/PC2D/Scripts/PlatformerMotor2D.cs index 7dc8541d..ff442430 100644 --- a/Assets/PC2D/Scripts/PlatformerMotor2D.cs +++ b/Assets/PC2D/Scripts/PlatformerMotor2D.cs @@ -1738,7 +1738,7 @@ private bool UpdateMovingPlatform() Collider2D col = Physics2D.OverlapArea( checkBounds.min, checkBounds.max, - _collisionMask); + movingPlatformLayerMask); if (col != null) {