camera_set_view_pos


Description

You can use this function to update the position of the camera view within the room. You give the unique camera ID value (as returned by the different camera_create functions) and then give the x and y positions to set the camera to.


Syntax:

camera_set_view_pos(camera_id, x, y)


Arguments:

Argument Description
camera_id The unique camera ID value returned when you created the camera.
x The x position to place the view at (in the room)
y The y position to place the view at (in the room)


Returns:

N/A


Example:

camera_set_view_pos(view_camera[0], x - (view_wport[0] / 2), y - (view_hport[0] / 2));

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


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