camera_get_view_angle


Description

This function can be used to retrieve the angle of the given camera. The return value will be between 0 and 360. Note that this function is only valid for cameras created using camera_create_view() or for those added in the room editor.


Syntax:

camera_get_view_angle(camera_id)


Arguments:

Argument Description
camera_id The unique camera ID value returned when you created the camera


Returns:

Real


Example:

var ang = camera_get_view_angle(view_camera[0]);
if ang != 0
   {
   camera_set_view_angle(view_camera[0], 0);
   }

The above code retrieves the angle of the camera assigned to view port[0] and then checks this to see if it matches the given value. If it does not then the view camera is set to that angle.


Back: Cameras
Next: camera_get_view_target
© Copyright YoYo Games Ltd. 2018 All Rights Reserved