x


unity landscape issue

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

more ▼

asked May 24 '11 at 11:35 AM

Sajjoo gravatar image

Sajjoo
49 39 40 45

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Add this to your code:

#if UNITY_IPHONE
    iPhoneKeyboard.autorotateToPortrait = false; 
    iPhoneKeyboard.autorotateToPortraitUpsideDown = false; 
    iPhoneKeyboard.autorotateToLandscapeRight = false; 
    iPhoneKeyboard.autorotateToLandscapeLeft = false;
#endif
more ▼

answered May 24 '11 at 12:11 PM

Henrique Vilela gravatar image

Henrique Vilela
333 12 15 19

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x179
x99
x52

asked: May 24 '11 at 11:35 AM

Seen: 1722 times

Last Updated: May 24 '11 at 01:12 PM