Time for action – creating the pigs
Let's get started with creating the pigs for the Angry Birds game:
- 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
. - 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. - Set the plane's local Position to
0
on each axis and set its Rotation to90
on the X axis,270
on the Y axis, and0
on the Z axis. This will make the plane face the camera. - Now, create two materials. Name one
Pig_Fresh
and the otherPig_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.