HTML and CSS Reference
In-Depth Information
Interactivity with Box2D
So far, we have simply placed objects in a defined Box2D world and let them move on their
own. While that type of application is great for teaching or instruction, creating an interactive
world with Box2D is a path to creating exciting games and simulations on the Canvas.
For this example, we will create a game where you shoot balls at a pile of boxes and knock
them over. However, before we get to that example, we will start with a simpler iteration
where we display some boxes and model them falling and rotating. (See Figure 5-28 . )
Figure 5-28. Boxes falling and rotating
Search WWH ::




Custom Search