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.



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


Matrix ID (real)


mat = camera_get_view_mat(camera_view[0]);

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