The "camera_get_view" Function

Syntax#

camera_get_view(camera);
ArgumentTypeDescription
cameracameraThe camera ID to check

Description#

Checks if a camera is currently assigned to a view, and if so, returns the view number (0-7). If the camera is not currently assigned to a view, -1 will be returned instead.

Example#

var view = camera_get_view(my_cam);
if (view > -1) {
camera_set_view_pos(view_camera[view], x, y);
}