O'Reilly logo

Unity 3D Game Development by Example by Ryan Henson Creighton

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

Time for action - multiple erections

We're going to erect four invisible walls around the play area to keep the heart reined in.

  1. Click on GameObject | Create Other | Cube.
  2. Rename the new Cube GameObject Wall Back.
  3. Give the Cube these transform settings in the Inspector panel:

    Position X:-0.15 Y: 1.3 Z: 1.6

    Rotation: X: 0 Y: 90 Z: 0

    Scale: X: 0.15 Y: 12 Z: 6

  4. Uncheck the Mesh Renderer checkbox in the Inspector panel to make the back wall invisible to the player.
    Time for action - multiple erections
  5. Repeat these steps to create three more Cubes called Wall Front, Wall Left, and Wall Right. These are the settings I used to place the other walls, but feel free to tweak them to suit your ...

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