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.
- Create a
Cylinder
. - Rename it as
O
. - Scale it to
3.5
,0.5
,3.5
. - Add a
Box Collider
to theCylinder
(by navigating to Component | Physics | Box Collider). Unity asks if you want to replace the existingCapsule Collider
with aBox Collider
. Yes you do! - Add a
Rigidbody
Component. - Position the
O
at0
,0
,0
. - Create a Prefab and name it
O
. - Drag the
O
GameObject inside theO
Prefab. - 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.