Cocos2d is such a versatile framework that it has even been ported and extended into a 3D game engine
appropriately titled
Cocos3d. In this recipe we will install Cocos3d XCode templates, create a sample Cocos3d application, and introduce the Cocos3d demo
mash-up
project.
Execute the following code:
#import "Ch8_Cocos3dWorld.h" #import "CC3PODResourceNode.h" #import "CC3ActionInterval.h" #import "CC3MeshNode.h" #import "CC3Camera.h" #import "CC3Light.h" @implementation Ch8_Cocos3dWorld -(void) dealloc { [super dealloc]; } -(void) initializeWorld { //Create the camera, place it back a bit, and add it to the world CC3Camera* cam = [CC3Camera nodeWithName: @"Camera"]; cam.location = cc3v( 0.0, 0.0, 6.0 ); [self addChild: cam]; //Create a light, place it back and to the left at a specific position (not just directional lighting), and add it to the world CC3Light...