Door Interactable
I’m not sure if there already was a door interactable, or maybe I just didn’t understand how I was supposed to do this, but here is a door interactable in case anyone wants to implement a simple open close door system. Does not contain locks or keys or anything like that.
There are two full scripts attached, they are all you need, just put them in your scripts folder, then attach the Door to your Door object, with it’s animator, give it a triggerable collider - this allows you to setup how big of an area to trigger the animation, think big doors, or drawbridges, etc… you then add a child object with just a collision collider, on where you want it to stop movement of the player, that will get disabled or enabled on open/close - using animation trigger.
It’s pretty straight forward, good starting point for anyone looking to quickly add open/close door mechanics. Apologies if I just completely missed this already built in somewhere! 😉

💬 Comments (4)
Want to continue the conversation?