Stefan Boeykens with this simple example of a door that will open automatically when the user approaches in Unity3D. The first video explains the main object setup: a cube as a door leaf, made child of an empty GameObject as the rotation center. And a non-visible box which will become our trigger.

Unity3D : Simple Opening Door (part 1) from Stefan Boeykens on Vimeo.

This is a simple example of a door that will open automatically when the user approaches.

Unity3D : Simple Opening Door (part 2) from Stefan Boeykens on Vimeo.

This is the second part of the opening door video. Here we will attach a quite simple script to the door to let it open smoothly. The script uses an easing technique to go fluently from closed to open. When entering the trigger, the OnTriggerEnter event will open the door. When leaving the trigger, the OnTriggerExit event will do the reverse smooth animation.

Privacy Policy