camera_set_view_border


Description

You can use this function to set the follow border of the view camera within the room. You give the unique camera ID value (as returned by the different camera_create functions) and then give the x border size and the y border size (horizontal and vertical). These values will only be used when the view camera has been assigned an instance target to follow (either in the Room Editor or using the function camera_set_view_target) and relate to how far from the border of the view the instance needs to be before the view will update its position to follow.


Syntax:

camera_set_view_border(camera_id, x_border, y_border)


Arguments:

Argument Description
camera_id The unique camera ID value returned when you created the camera.
x_border The border (in pixels) for the view camera along the horizontal axis
y_border The border (in pixels) for the view camera along the vertical axis


Returns:

N/A


Example:

camera_set_view_border(view_camera[0], 64, 64);

The above code will set the view camera border for the camera assigned to view port[0].


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