Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

Screen.orientation absolutely fails to respond

$
0
0
so i am making this game for iOS, and in it I display pictures on the screen, in landscape mode i want them to look like this X X X in portrait i want them to look like this X X X i realized that since the player would be rotating their device the objects wouldn't even need to move! (YAY) all i needed to do was to rotate them so they remain facing the same way each time. so i am trying to make the objects rotate to fit each orientation but for some reason, when i open the game in my Xcode iOS simulator, there are no effects. none, zilch. what do you think is going on? heres the code, it is attached to my three game objects if(Screen.orientation == ScreenOrientation.LandscapeRight){ transform.rotation.eulerAngles = Vector3(0,0,90); } if(Screen.orientation == ScreenOrientation.PortraitUpsideDown){ transform.rotation.eulerAngles = Vector3(0,0,180); } if(Screen.orientation == ScreenOrientation.LandscapeLeft){ transform.rotation.eulerAngles = Vector3(0,0,270); } if(Screen.orientation == ScreenOrientation.Portrait){ transform.rotation.eulerAngles = Vector3(0,0,0); } thanks for all help!

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>