![]() The view matrix can be set up using the function “ matrix_build_lookat”: var _viewMat = matrix_build_lookat(cam_x, cam_y, cam_z, look_x, look_y, look_z, 0, 1, 0) The projection matrix defines how the world is rendered for example, whether the view is orthographic or perspective, what the field of view is, etc. ![]() The view matrix defines where the camera is, and where it’s looking. Using a 3D camera in GML mainly consists of setting up a projection matrix and a view matrix. This means that we only need to set up our 3D camera properly, and the rest will be handled by the layer system! 3D CAMERAS What’s interesting about this, is that the depth value actually corresponds to the “z” value in 3D space! So the third dimension, z, would be the distance of a layer from the camera. Three visible layers with depths 0, 100 and 200
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |