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

The mole

The Asset Store is full of mole assets starting at around US $ 4.00, but rather than pay for something, we will construct our own gray box asset. Our mole will be constructed of simple shapes and an animation. The mole will reside in an empty GameObject, which will serve as a container and positioning tool:

  1. Create an empty GameObject as a child of MoleGame called MolePosition (1). This item will contain our mole assets and be used to position the pesky varmint in the scene.
We add (1) to the end of any GameObject that we plan to duplicate. When Unity duplicates the object, it will increment the number accordingly.
  1. Create another empty GameObject. This one should be a child of MolePosition (1) called Mole.

With the containers ...

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