I have shifted to scale outer from letterbox and have observed some unexpected behavior when working with the variable viewportWidth.
I have a viewport size of 1080 x 1920 (9:16 aspect ratio). When I have a window that is wider than this, the variable viewportHeight stays fixed at 1920 and viewportWidth returns some value say 4000.
What I am struggling with is to utilize the viewportWidth to calculate the center point and set the position of an object to this point.
During letterbox mode this would be 540, 960 and now it is ? , 960. When testing, it appears the center to be something around the 300s when stretch to a width around 4000. How do I calculate this? I did not see an immediate relation ship to the aspect ratio jumping out at me.
Perhaps there is a much simpler way for reliably determining the "center" when in scale outer to position objects relative to it.
Any help is appreciated!