Aspect ratio settings (solved)

I implemented a setting option for aspect ratio, to be better compatible with multiple devices,
but the camera position did not update correctly, till i used a timer to change camera after i changed the resolution. Then it works fine in prewiew:

But on phone however, the camera does not uptade at all.
maybe i need a greater timer for phone, i will test that tomorrow (2 exports done)

Any idea why the camera on phone acts different then in preview?

Hi, maybe this helps you can adapt width/height ddepending on your need

1 Like

this setup wont work on android devices.
the whole point of me implementing aspect ratios is to avoid distortions and have the touch working precicly.

i think the problem is the time it takes to rerender for different resolutions.
my solution was 2 things.
1st. instread of useing screenwith/2 Screenheight/2 i put in a center object, hide it and make camera center on it.
2nd i improved on my timer idea, instead of having the recentering as a tigger once event, i let it run when timer is greater than 0 and stop it after 2 seconds.