I'm sure this has been answered somewhere already so I'm sorry for asking again. What I'm looking for is to check if a mobile device has been rotated and the screens orientation has changed to be on the side. I know using a touch object I can check how far it's been turned left and right but that doesn't actually tell me if the screen has flipped.
Is there any way to get the full window size rather than just the container that the game is in maybe? I thought about checking if windowWidh > windowHeight which would make me think the screen has been rotated but this doesn't work unfortunately.
I'd imagine there would be some easy way to do this, unfortunately when ever I search for it all I'm finding is results on how to tell how far the device is turned rather than if the screen has actually changed orientation.
Any help anyone is able to give me would be greatly appreciated, and sorry again for what I assume is a double post.