Class cc.Camera

Class Summary
Constructor Attributes Constructor Name and Description
 

A CCCamera is used in every CCNode.

Method Summary

Class Detail

cc.Camera()

A CCCamera is used in every CCNode.
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 effecs, use the action CCFollow or position/scale/rotate. *

Method Detail

  • <static> {Number} cc.Camera.getZEye()
    returns the Z eye
    Returns:
    {Number}