-
Notifications
You must be signed in to change notification settings - Fork 6
camera_init
Nabil Sekirime edited this page Feb 12, 2018
·
1 revision
Initializes a 3D camera and returns its ID
This function will create a new camera, set a projection matrix to it, bind it to the view that matches it's index, set an update script, and return it's ID.
camera_init(camera_index,camera_enabled,fov,ratio,znear,zfar,camera_script)
Argument | Description |
---|---|
camera_index | The Index of the Camera that you are creating (0 - 9) |
camera_enabled | Whether or not the camera is being drawn |
fov | Field of View of the camera (Degrees of visibility) |
ratio | Ratio of camera ( Think Width of camera/Height of Camera) |
znear | The minimum distance from the camera that will be drawn |
zfar | The maximum distance from the camera that will be drawn |
camera_script | The script that will be ran every frame that will control the camera |
camera_1 = camera_init(0,true,85,view_get_wport(0)/view_get_hport(0),32,32000,camera_update_0);