Time for action – multiple erections

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

  1. Navigate to 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.4 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. The best way to do this is to duplicate the Front Wall three times. Just right-click/alternate-click ...

Get Unity 4.x Game Development by Example Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.