Getting ready

Before we start, you should prepare a death trap model. We are using a "press trap" as an example. It contains two identical moving elements. See the following screenshot:

The model is not skinned and has no rig; instead, the moving elements are separate objects. We will animate them with Unity's Animation View. You can also use the example Unity project provided and go to the Chapter 02 Working with the animation viewRecipe 06 Animating triggers - creating a death trap directory. You will find an Example.unity scene there. If you play the game, you can see the trap working. If you open the scene, you will find the Trap game object with the LeftTrap and RightTrap game objects as its children. Those child objects are the only ones animated in this example. They have trigger objects as their children. Those trigger objects kill the player when he enters them. All other child objects of the Trap game object are only decorations and are optional.

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

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