Time for action – boy O boy

Unity doesn't have a Tube primitive that we can use to create the O player piece, but we can use the Cylinder primitive to create an "un-holey" approximation.

  1. Create a Cylinder.
  2. Rename it as O.
  3. Scale it to 3.5,0.5,3.5.
    Time for action – boy O boy
  4. Add a Box Collider to the Cylinder (by navigating to Component | Physics | Box Collider). Unity asks if you want to replace the existing Capsule Collider with a Box Collider. Yes you do!
  5. Add a Rigidbody Component.
  6. Position the O at 0,0,0.
  7. Create a Prefab and name it O.
  8. Drag the O GameObject inside the O Prefab.
  9. Delete the O GameObject from the Hierarchy panel.

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.