Search code examples
3dcocos2d-iphoneccspritedepth

Cocos2D CCSprite fake depth?


I am currently doing a flip card effect in Cocos2D. What I am currently trying to achieve is the perception of depth in my CCSprite. Now I am not looking for some all out 3D code/program or to use Cocos3D.

All I want is to do is to make the illusion that the CCSprite that is spinning to have a little bit of depth to provide more realism in my game.

Now the sprite is not spinning that fast, it is at a moderate pace and thats why I am trying to achieve this.

Does anyone know how I can go upon this?

Thanks!


Solution

  • Check code of CCTransitionFlipX and CCTransitionFlipY in cocos2d sources. They use CCOrbitCamera actions. Maybe it will be helpful to you.