Positioning at absolute bottom

I’m trying to position a ground (platform) exactly at the bottom of the device screen, but its position changes when I change the screen aspect ratio, as you can see in these images below:

https://prnt.sc/pu8wc0

https://prnt.sc/pu8wc0

I’ve already tried changing .contentHeight to .actualContentHeight, but it didn’t go as expected. I’ve also changed the content scale in config.lua file, but the game got completely deformed. How can I fix it?

This blog post should help you…  https://coronalabs.com/blog/2018/08/08/understanding-content-scaling-in-corona/

Rob

Here too is and example that may help you understand how to figure things out:

https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2015/10/lgg4.zip

lgg4.png

From my AskEd repository (400+ code answers to posts).  Get whole set and more by downloading RG FreeStuff:

https://github.com/roaminggamer/RG_FreeStuff/archive/master.zip

Thank you guys for your responses.

I fixed this problem in config.lua by calculating the device screen aspect ratio and then setting the content dimensions accordingly.

That’s what I have in config.lua:

local aspectRatio = display.pixelHeight / display.pixelWidth application = { content = { width = 320, height = 320\*aspectRatio, scale = "letterbox", fps = 60, }, }

This way the content dimensions properties I mentioned before are working as I expected them to.