Archive 17/01/2023.

Question about ortho mode

rogerdv

In the 2D tile map sample I see this in the camera creation:

I tested my code with, and without that line. It looks the same, except that using that, the camera start closer to “ground”. So, I guess this is not mandatory, but I would like to know whats the effect of this line.

Mike

This is used to auto-adjust 2D camera aspect ratio based on screen resolution.
In this way aspect ratio is also preserved when rotating a mobile device.