camera_get_view_height


Description

This function can be used to retrieve the height (in pixels) of the given camera.


Syntax:

camera_get_view_height(camera_id)


Arguments:

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


Returns:

Real


Example:

var vw = camera_get_view_width(view_camera[0]) / 2;
var vh = camera_get_view_height(view_camera[0]) / 2;
camera_set_view_pos(view_camera[0], x - vw, y - vh);

The above code retrieves the width and height of the camera assigned to view port[0] and then sets its position relative to the center.


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