From ce681510ea5a2eb57b0098c68f63416f2479352b Mon Sep 17 00:00:00 2001 From: GodGodGod20081 <94980235+GodGodGod20081@users.noreply.github.com> Date: Thu, 18 Jun 2026 13:53:07 +0200 Subject: [PATCH] door script improve --- Assets/Scripts/Door_Rotate.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Assets/Scripts/Door_Rotate.cs b/Assets/Scripts/Door_Rotate.cs index ea85b97..03e3fa9 100644 --- a/Assets/Scripts/Door_Rotate.cs +++ b/Assets/Scripts/Door_Rotate.cs @@ -20,7 +20,6 @@ public class Door_Rotate : MonoBehaviour currentRotation = transform.localEulerAngles.y; targetRotation = currentRotation; - // Calculate pivot point from rotation offset pivotPoint = transform.position + rotationOffset; } @@ -44,7 +43,6 @@ public class Door_Rotate : MonoBehaviour { currentRotation = Mathf.Lerp(currentRotation, targetRotation, Time.deltaTime * rotationSpeed); - // Rotate around the pivot point transform.RotateAround(pivotPoint, Vector3.up, (currentRotation - transform.localEulerAngles.y)); transform.localEulerAngles = new Vector3( transform.localEulerAngles.x,