O'Reilly logo

Learning Unity 2D Game Development by Example by Venita Pereira

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Let's simulate the world

Now that we have a better understanding of the basics of physics and we know about the new Physics 2D in Unity as well as Box2D, we are ready to make use of all these faculties to create our very own physics game.

We will create a very simple physics game similar to Angry Birds. We will have a cannon that shoots out cannonballs.

We can shoot out cannonballs by pressing the Space bar, and we can control where the ball lands by increasing or decreasing the power of the cannonball using the W and S keys.

The aim of the game is to shoot the crates and planks in the scene. We won't need to set up animations since the physics will take care of all the movements in the game.

The environment

The first thing we will do is create our ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required