Creating a dynamic box in the physics world

Imagine now that we drop a box into the world. The box falls from the air and finally hits the ground. The box bounces up a little and finally lands on the ground. This is different from what we created in the last section. In the last section, we created a static ground, which was immovable and could not be affected by gravity. Now, we will create a dynamic box.

Get HTML5 Game Development by Example : Beginner's Guide - Second Edition 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.