Screen rotate

IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
edited November -1 in Working with GS (Mac)
Hello,
I made my game in iPhone Landscape, but I would like to change it to iPhone Portrait when player rotate his device to this position (but I want it to be active only once in the concrete moment). Is it possible? How to do it?

Thank you very much.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Check out FMG's camera tricks demo. You will need to check the accelerometer values to determine when the phone has been tilted, then apply the rotate camera rules as outlined in FMG's demo.
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    Thank you very much for this advice :)
  • ORBZORBZ Member Posts: 1,304
    Or, much easier is to just toggle the checkboxes in the scene editor under Camera.Autorotation and set the scene rotations you want to use. Then at runtime just check the Game.Screen.DeviceOrientation or Game.Screen.InterfaceOrientation and do whatever logic you want depending on the orientation.
Sign In or Register to comment.