From 8386f83ee1eb0eaaeb6c26aa45c41b4702dc9df0 Mon Sep 17 00:00:00 2001 From: haitem Date: Sat, 29 Jan 2022 14:13:35 +0100 Subject: [PATCH] Fix not box collider --- Assets/Scripts/PlayerController.cs | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs index b405c48..5455343 100644 --- a/Assets/Scripts/PlayerController.cs +++ b/Assets/Scripts/PlayerController.cs @@ -110,15 +110,7 @@ public class PlayerController : MonoBehaviour return; } - if (other.GetContact(0).normal == other.transform.forward - || other.GetContact(0).normal == -other.transform.forward - || ( - other.GetContact(0).normal != -other.transform.up - && other.GetContact(0).normal != other.transform.up - && other.GetContact(0).normal != -other.transform.right - && other.GetContact(0).normal != other.transform.right - ) - ) + if (other.GetContact(0).normal == other.transform.forward || other.GetContact(0).normal == -other.transform.forward) { return; } @@ -134,15 +126,7 @@ public class PlayerController : MonoBehaviour if (other.gameObject.tag == "platform") { - if (other.GetContact(0).normal == other.transform.forward - || other.GetContact(0).normal == -other.transform.forward - || ( - other.GetContact(0).normal != -other.transform.up - && other.GetContact(0).normal != other.transform.up - && other.GetContact(0).normal != -other.transform.right - && other.GetContact(0).normal != other.transform.right - ) - ) + if (other.GetContact(0).normal == other.transform.forward || other.GetContact(0).normal == -other.transform.forward) { return; }