camera_get_view_x


Description

This function can be used to retrieve the x position of the view for a given camera.


Syntax:

camera_get_view_x(camera_id)


Arguments:

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


Returns:

Real


Example:

var vx = camera_get_view_x(view_camera[0]);
var vy = camera_get_view_y(view_camera[0]);
draw_text(vx + 5, vy + 5, "SCORE" + string(score));

The above code retrieves the position of the camera assigned to view port[0] and then draws text relative to that position.


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