A CCCamera is used in every CCNode. Useful to look at the object from different views. The OpenGL gluLookAt() function is used to locate the camera. If the object is transformed by any of the scale, rotation or position attributes, then they will override the camera. IMPORTANT: Either your use the camera or the rotation/scale/position properties. You can’t use both. World coordinates won’t work if you use the camera. Limitations:
- Some nodes, like CCParallaxNode, CCParticle uses world node coordinates, and they won’t work properly if you move them (or any of their ancestors) using the camera.
- It doesn’t work on batched nodes like CCSprite objects when they are parented to a CCSpriteBatchNode object.
- It is recommended to use it ONLY if you are going to create 3D effects. For 2D effects, use the action CCFollow or position/scale/rotate.