
The Interactive Door System offers a robust and flexible framework for building dynamic, engaging door mechanisms in Unity, bringing your projects to life with seamless interactivity and control.The Interactive Door System provides an intuitive and powerful solution for crafting highly interactive and responsive door mechanics in Unity, enhancing gameplay with smooth, customizable functionality.For a list of features, see Technical Details🚪 Door.cs🔄 Smooth Rotation: Uses coroutine (RotateDoor) to smoothly interpolate between openRotation and closedRotation with adjustable openSpeed.🎚️ Door Types: Supports Trigger (auto-open), KeyDoor (requires key), and Normal (manual interaction).🆔 ID System: doorID for pairing with keys.👁️ DoorRaycast.cs🔍 Raycast Interaction: Casts a ray on E press to detect doors within rayDistance on doorLayer.🚫 KeyDoor Exclusion: Only interacts with Trigger and Normal door types (ignores KeyDoor).⚡ DoorTrigger.cs🤖 Auto-Trigger: Automatically toggles targetDoor when a Player enters the collider.🔗 Direct Reference: Requires manual assignment of targetDoor in the inspector.🔑 Key.cs🖐️ Pickup/Drop: PickupKey() hides the key and shows keyInHand; DropKey() throws it forward on G press.🆔 Key-Door Pairing: keyID matches doorID for unlocking.👁️🔑 KeyRaycast.cs🎯 Dual Functionality:🔑 Pickup Key: Casts ray on E to pick up keys on keyLayer, disabling physics and showing keyInHand.🚪 Unlock KeyDoor: Uses held key on KeyDoor if doorID matches.🗑️ Drop Mechanic: G drops the key, re-enables physics, and resets its position.🧩 System Integration🔐 Key-Door Logic: KeyDoor only opens if the held key’s keyID matches the door’s doorID.🎮 Input Flow: E handles both interaction and key usage; G is dedicated to dropping keys.