# cocos.actions.camera_actions module

Camera Actions

Actions that moves the OpenGL camera.

exception `CameraException`

  Bases: `Exception`

class `Camera3DAction`(*args, **kwargs)

  Bases: `cocos.actions.base_actions.IntervalAction`

  `init`(duration=2)

    Initialize the Camera Action

    Parameters: | duration : int Number of seconds that the action will last

  `start`()

class `OrbitCamera`(*args, **kwargs)

  Bases: `cocos.actions.camera_actions.Camera3DAction`

  Orbits the camera around the center of the screen using spherical coordinates

  `get_spherical_coords`()

    returns the spherical coordinates from a cartesian coordinates

    using this formula:

    > - http://www.math.montana.edu/frankw/ccp/multiworld/multipleIVP/spherical/body.htm#converting

    Return type: | (radius, zenith, azimuth)

  `init`(radius=None, delta_radius=0, angle_z=None, delta_z=0, angle_x=None, delta_x=0, *args, **kw)

    Initialize the camera with spherical coordinates

    Parameters: | radius : float Radius of the orbit. Default: current radius delta_radius : float Delta movement of the radius. Default: 0 angle_z : float The zenith angle of the spherical coordinate in degrees. Default: current delta_z : float Relative movement of the zenith angle. Default: 0 angle_x : float The azimuth angle of the spherical coordinate in degrees. Default: 0 delta_x : float Relative movement of the azimuth angle. Default: 0

    For more information regarding spherical coordinates, read this:
      http://en.wikipedia.org/wiki/Spherical_coordinates
  `start`()
  `update`(t)