Time for action – multiple erections
We're going to erect four invisible walls around the play area to keep the heart reined in.
- Navigate to GameObject | Create Other | Cube.
- Rename the new Cube GameObject
Wall Back
. - 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
- Uncheck the Mesh Renderer checkbox in the Inspector panel to make the back wall invisible to the player.
- Repeat these steps to create three more Cubes called
Wall Front
,Wall Left
, andWall 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.