Let me start by saying how happy I am that I found Cocos2d for the iPhone! It really helped my little game progress a lot.
I'm only a hobbyist developer so I still get stuck from time to time. Picture this scene: a street view from the front with a character walking towards the you. This would mean you have buildings and scenery at both sides of the screen that scroll towards the back while the character is walking towards you. No I have an idea of how to set this up but I'm not sure how to set it up and how to make it work properly.
The idea is:
- create a Layer for each side of the screen, let's take the left side as an example
- create a scrolling animation of the background images that I would like to show here, scrolling from left to right
- then use OrbitCamera to create an OpenGL Z-vertex effect (like in the AtlasSpriteTest demo) to create the 3D effect and lock it at the right angle.
Main questions are, would this be a good idea (If not any other ideas?)? And how can I create a static angle so that the buildings on side have the right perspective?
The following line animates it but I don't want anymation, just an angled view.
[self runAction:[OrbitCamera actionWithDuration:10 radius: 1 deltaRadius:0 angleZ:0 deltaAngleZ:360 angleX:0 deltaAngleX:0]];
Any help would be greatly appreciated!
Thanks