I have question about windowWidth parameter, I read couple of threads I could find but could not figure a solution.
ok so scenario is this, I have two TiledBG-s for health hud.
I want red one to be scaled to same size as playable window of the game (camera is fixed, does not move)
I used RedTiledBG.width=windowWidth
Then I have Health and Max Health, in event bellow I calculate what percentage of maxhealth is current health and then I translate this into hud.
so if current health is 40% of max health, width for GreenTiledBG will be 40% of RedTiledBG width, which is turn should be equal of playable window width.
this works well and correctly when fullscreen in browser is set to "Off"
but when its set to letterbox
something like this happens
I don't understand exactly whats going on here, but I know its being scaled somehow and windowWidth is behaving like it should from other threads.
But in my case what alternative can I use to accomplish my task? is there anyway to capture actual playable area window width?