camera_get_active


Description

This function can be used to retrieve the unique camera ID value of the currently active camera.


Syntax:

camera_get_active()


Returns:

Camera index (real).


Example:

var active = camera_get_active();
if active != view_camera[0]
    {
    view_camera[0] = active;
    }

The above code gets the camera ID for the active camera and sets the view camera for port[0] to use it.


Back: Cameras
Next: view_camera
© Copyright YoYo Games Ltd. 2017 All Rights Reserved