By making some modifications to Box2D we can turn a 2D world into a 2.5D world. We will see this 2.5D sandbox in action in this recipe.
Please refer to the project RecipeCollection02 for full working code of this recipe. Also note that a large amount of code from this recipe has been omitted for brevity.
Execute the following code:
@interface GameIsoObject : GameObject { @public float yModifier; //This is typically half the height of the object. It allows us to change the sprite y. float actualImageSize; //This is the actual size of the image (48x48, 96x96, etc) float inGameSize; //This is how large the object in the game is. float zModifier; //Changes the depth testing for this object. CCSprite *spriteShadow; Vector3D *bounceCoefficient; //x, y, z, lower is bouncier for Z Vector3D *rollCoefficient; } @end /* IsometricContactListener.h */ class isometricContactListener : public b2ContactListener...