How to open and close doors / A guide for architects

Guys,

I imported my building model into unity. With a quick workaround i can walk around and climb stairs, explore other floors etc. But i have a problem. When i make all the building as a mesh collider, i cant enter the rooms. When i don’t im just running around like casper penetrating all the walls. So i need my doors to be opened and closed after a while automatically. The trigger should be my char which is named as “first person controller”.

How can i do it ? Please give me step by step instructions because i’m a total noob about these.

To create a open and close door, you can use the Animation window to create it with Ease. Check out the Animation Window in the reference manual, and then write right code that should trigger it to shut and close.

You can use OnTriggerEnter and or OnTriggerExit

1 Like