O'Reilly logo

Cocos2d-x by Example : Beginner's Guide - Second Edition by Roger Engelbert

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

Reusing b2Bodies

In Eskimo, we have a pool of b2Bodies that are used inside the Platform objects and we also change the shape of the little Eskimo whenever the player taps the screen. This is possible because Box2D makes it very easy to change the fixture data of a b2Body fixture without having to destroy the actual body.

Let me show you how.

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