Is there any known issue to getting the windowwidth or height on mobile?
I'm trying to set a tiled background to windowwidth * 0.9 / windowheight * 0.9 and it always is larger than the screen.
If I tell it to be a specific size it seems to be fine. :/
Any ideas?
I'm guessing phone you're testing it on doesn't have the same resolution as the native resolution of the game you made.
Anyway, use ViewportRight(layer) as your "width" and ViewportBottom(layer) as your "height".
Develop games in your browser. Powerful, performant & highly capable.
width = ViewportRight(layer) - ViewportLeft(layer)
height = ViewportBottom(layer) - ViewportTop(layer)
You can't rely on top and left being 0, in all configurations.
I forgot to mention that I've already tried those. Thanks though.
More Info:
My project scale mode is crop.
On desktop the tiledBG sizes fine, on my nexus and bionic (mobile chrome, firefox, opera) it does not.