- Home /
Question by
NinjaRubberBand · Apr 19, 2014 at 03:52 PM ·
rigidbodyscreenruntime
Change screen orientation in runtime
My game is a 2d game for smartphones, where you hold the phone in portrait. But there is a mode where you can play two players, and i need the orientation to be set to Landscape. How can i change the orientation so i can hold my phone in landscape mode and the objects doesnt fall down? My player has a rigidbody si its a little har to just make it sideways. I found this: Screen.orientation = ScreenOrientation.LandscapeLeft; But i dont know how to use it properly.
Comment
Screen.orientation = ScreenOrientation.LandscapeLeft; theres nothing more to it? i dont get it is your Physics.gravity changing with your smartphone gyro?
Yeah sort of. I want it so i can change between Landscape mode and potrait mode in runtime.