From a33228238f3385def0cb3b34c53c41805d2fa519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Gro=C3=9F?= Date: Sun, 2 Sep 2018 17:57:38 +0200 Subject: [PATCH] [FIX] Lurch respawn Fixed issues with respawning the lurch when sticking to ground --- Assets/Scripts/LurchMovement.cs | 4 ++++ Assets/Scripts/LurchRespawn.cs | 1 + 2 files changed, 5 insertions(+) diff --git a/Assets/Scripts/LurchMovement.cs b/Assets/Scripts/LurchMovement.cs index fd734d3..d38fda2 100644 --- a/Assets/Scripts/LurchMovement.cs +++ b/Assets/Scripts/LurchMovement.cs @@ -82,6 +82,10 @@ public class LurchMovement : MonoBehaviour { StickToPoint(); } + public void DontStick() + { + stickToGround = false; + } void MouseControl() { float mouseInputX = Input.GetAxis("Mouse X") * mouseSensitivity; diff --git a/Assets/Scripts/LurchRespawn.cs b/Assets/Scripts/LurchRespawn.cs index c578901..92bf60a 100644 --- a/Assets/Scripts/LurchRespawn.cs +++ b/Assets/Scripts/LurchRespawn.cs @@ -114,6 +114,7 @@ public class LurchRespawn : MonoBehaviour { public void RespawnLurch(string message = "Lurch respawned") { Debug.LogWarning("Lurch respawned: " + message); + compLurchMovement.DontStick(); lurch.transform.position = lastRespawnPoint.transform.position; }