I am working with different aspect ratios (using scale outer) and would like that an object would be in the center of the screen no matter what is the apsect ratio of the screen
x center = ((ViewportRight("layer") - ViewportLeft("layer")) / 2)
Y center = ((ViewportBottom("layer") - ViewportTop("layer")) / 2)
Should work on any scaling settings.
Develop games in your browser. Powerful, performant & highly capable.
great, thanks! and also for your other answer