Time for action – creating the pigs

Let's get started with creating the pigs for the Angry Birds game:

  1. The pigs are created in a manner similar to that of the the wood planks. Start by creating an empty GameObject and naming it Pig.
  2. Next, create a plane, make it a child of the Pig object, and remove its Mesh Collider component. We do this because of the rotation the plane will need to face the camera. Being a child of the empty GameObject allows us to ignore that rotation when working with the pig.
  3. Set the plane's local Position to 0 on each axis and set its Rotation to 90 on the X axis, 270 on the Y axis, and 0 on the Z axis. This will make the plane face the camera.
  4. Now, create two materials. Name one Pig_Fresh and the other Pig_Damage. From their ...

Get Unity Android 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.