hello guys, i am working on a racing game for iPhone whose default orientation is landscape. i have set the orientation in PlayerSetting -> Resolution and Presentation to landscape right. but when i run the app on iPhone and use the accelerometer to turn the bike it gives me effect like its orientation is being changed. but after having that effect orientation remains same.
can anybody guide me why this effect i am getting? any help will be appreciative. thanks
Answer by Henrique Vilela
May 24, 2011 at 12:11 PM
Add this to your code:
iPhoneKeyboard.autorotateToPortrait = false;
iPhoneKeyboard.autorotateToPortraitUpsideDown = false;
iPhoneKeyboard.autorotateToLandscapeRight = false;
iPhoneKeyboard.autorotateToLandscapeLeft = false;
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
2 People are following this question.
iOS unity splash screen wrong landscape orientation?
Why do I get lower framerate in Portrait than I do in Landscape? Can I fix this?
iOS orientation problem
Is is possible for Unity 3D smartphone app to support multiple orientations
Screen orientation change in scenes (unwanted effect)