![]() 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 ![]() So, a layer with a lower depth would be drawn above a layer that has a higher depth. If you’ve used the Room Editor, you’ll know that each layer has a “depth” value. There is also a video version of this tutorial (but make sure to also read this post as it covers more than the video):.You can download the project here, and have it open on the side, as you read this blog.Let’s learn how this magic can be incorporated into any game! ![]() I didn’t want to create a generic, 2D tiled area, with just one layer to fill the background I wanted it to be a little more complex and three-dimensional, while still being a 2D game.Īnd you know what GameMaker Studio 2 has? 3D cameras, and depth-based layers. I was working on the town area for one of my side-projects and was struggling with how to build it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |