camera_get_view_mat


Description

This function can be used to retrieve the view matrix. The function returns the matrix ID value which can then be used in other matrix functions or to set the view matrix of another camera (using camera_set_view_mat). Note that this function is generally for use with cameras created using camera_create(), but it can also be used on those created in the room editor (or with camera_create_view) - in which case the returned matrix will only be valid after the given camera is used in a view port for the first time.


Syntax:

camera_get_view_mat(camera_id)


Arguments:

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


Returns:

Matrix ID (real)


Example:

mat = camera_get_view_mat(camera_view[0]);

The above code gets the view matrix for the camera assigned to view port[0].


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