O'Reilly logo

Virtual Reality Blueprints by John Williamson, Charles Palmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding transitions

Next, we need to set the condition for each transition. The condition decides when a zombie transitions from one state to another, such as from walking to attacking. For our game, we have seven transitions, as shown in Table 5.3. A zombie's starting state is walking and it transitions to either attacking or dying, depending on whether it collides with the player or the Raycaster. If it collides with the Raycaster, the transition is one of the three death animations. If it collides with the player, then it plays an attack before switching to a death:

  1. Select a transition arrow and review its settings in the Inspector window. Note that at the bottom of the window the Condition panel is empty. Add a condition to each transition ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required