Creating a static ground body in the physics world

The world is empty now. If we are going to place objects there, the objects will fall and finally leave our sight. Now, suppose we want to create a static ground body in the world so that objects can stand on it. We can do this in Box2D.

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.