The project I am working on is using a camera zoom (fixed fit projection) value of 0.65. The 2D artist I am working with used the high dpi option and it resulted in the zoom level changing dramatically (from close up to far away). Both of the screenshots I am posting are from iPhone 11.
In an HTML browser, everything seems to be fine as it looks like the original large cake. Is there a proper method to normalize the zoom level across different devices or would I have to use conditional logic to detect the current display profile or something like that?
@britzl Sorry for reviving this issue, I actually didn’t realize one issue until today. It seems that I am getting the wrong numbers when using defos.get_window_size()
I’ve set up height brackets to change initial zoom and devices that should be in bracket E are in bracket F. There is an instance of a device that is getting C when it should be in A. There are other strange issues like this. I am querying height.
I expect to not get the full height in browsers because the address bar and other bits will shrink the size. I wonder if the game.project resolution (720x1280) is maybe causing this issue? I’ve posted code snippets below:
This is how I am using defOS:
x, y, w, h = defos.get_window_size()
print("window dimensions: " .. w .. "x" .. h)
This is the bracket sorting I am doing:
if (h >= 2500) then
preset = zoomPresets.bracketA
elseif (h >= 2048) then
preset = zoomPresets.bracketB
elseif (h >= 1600) then
preset = zoomPresets.bracketC
elseif (h >= 1300) then
preset = zoomPresets.bracketD
elseif (h >= 1024) then
preset = zoomPresets.bracketE
elseif (h >= 740) then
preset = zoomPresets.bracketF
else
preset = zoomPresets.default
end