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

Animating the mole

Our moles will randomly popup from their holes so that the player can bash them with the mallet. To do this, we have to build a simple animator which tells the mole how and when to move:

  1. Create a new folder called Animators in the Project panel.
  2. Select Window | Animation from the main menu. We will use this window to set keyframes for the Mole GameObject's position.

The Animation window (shown in Figure 8. 4) is used to create animation clips for individual GameObjects. The following steps involve creating the popup animation for our mole. For the pop-down animation, we will play this animation in reverse:

Figure 8.4: ...

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