Getting ready

To make an animated door, you should have two objects ready: the Door Frame and the Door. The Door should be a child of the Frame in the Hierarchy. It should be placed in the closed position. We assume that our Door will slide upward when opening. You should also have a player character with the Player tag assigned. The character should use a Rigidbody component to move or have a kinematic Rigidbody component. We will use triggers for our doors, and triggers react to Rigid bodies only. You can also go to the Chapter 02 Working with the animation viewRecipe 04 Animating objects local position - creating automatic doors directory and find the Example.unity scene there. If you open it, you can find Automatic Door game object in the Hierarchy and a Sheep game object that will work as our player (it has the Player tag). If you run the game and go near the door, it will open.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.9.169