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,