Skip to main content

The "camera_get_view_bbox_right" Function

Syntax#

camera_get_view_bbox_right(camera);
ArgumentTypeDescription
cameracameraThe camera index to check (typically view_camera[#])

Description#

Returns the width in pixels of the right bounding box (or pillarbox) of a camera, if it is currently assigned to a view. This value is relative to the base width defined in config, and is useful for managing non-scaled, centered content within a scaled viewport. If the camera is not assigned to a view, 0 will be returned instead.

Note that this does not measure space outside the view when min/max aspect ratios are employed, but rather the space inside a scaled view relative to an unscaled view.

Example#

draw_rectangle(camera_get_view_bbox_right(), 0, view_width, view_height, false);