Time for action – bottoming out

When the player clicks on the invisible Square GameObjects, the X and O pieces are going to fall gently into place. The rigidbodies attached to each piece will include them in the physics engine, and gravity will take over. However, the pieces will fall straight into oblivion unless we build a "floor" beneath the grid to stop them.

Let's create a floor to keep the falling pieces contained

  1. Create a Plane.
  2. Rename it as floor.
  3. Scale it up so that it is larger than the Grid GameObject.
    Time for action – bottoming out
  4. Switch to a Right view in the Scene view and position the Floor so that it sits just beneath the Grid GameObject.
  5. In the Inspector panel, turn ...

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.