diff --git a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs index faf57b54..0b01dbaa 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs @@ -471,6 +471,9 @@ public class PlayerController : Script private void Gravity() { + if (currentState == RaccoonStates.CAUGHT) + return; + if (rb != null) { //check player vel.y if its close to zero its on the ground @@ -554,6 +557,7 @@ public class PlayerController : Script rb.ClearTorque(); rb.LinearVelocity = Vector3.Zero; rb.AngularVelocity = Vector3.Zero; + collider.GetCollisionShape(0).IsTrigger = true; } public void Reset() @@ -565,6 +569,7 @@ public class PlayerController : Script if (stateMachine && !stateMachine.IsState(typeof(PlayerIdleState))) stateMachine.SetState(typeof(PlayerIdleState)); + collider.GetCollisionShape(0).IsTrigger = false; tranform.GlobalPosition = respawnPoint.GetComponent().GlobalPosition; GameManager.Instance.RacoonCaught();