Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How do i disable rotating with the phone?

Author
Message
Kaev
9
Years of Service
User Offline
Joined: 13th Dec 2014
Location:
Posted: 17th Dec 2014 11:06
Hiho!

I'm creating a game for android and found out, that the game automatically will rotate with my phone, when i rotate it. How can i disable that? Not sure if i can do it via code (I'm using C++). I think i have to edit one of the files which are already in the template. Would be nice if you could give me a hint where i can find that.

~Kaev
Phat
9
Years of Service
User Offline
Joined: 20th May 2014
Location:
Posted: 17th Dec 2014 14:05
http://www.appgamekit.com/documentation/Reference/Core/SetOrientationAllowed.htm

SetOrientationAllowed( portrait, portrait2, landscape, landscape2 )
Funnell7
12
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 17th Dec 2014 14:06
SetOrientationAllowed( portrait, portrait2, landscape, landscape2 )

http://appgamekit.com/documentation/Reference/Core/SetOrientationAllowed.htm
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 19th Dec 2014 21:19
You've got your answer but just for fun, here is a little helper that I use:



You can then do this:

Login to post a reply

Server time is: 2024-05-08 13:15:37
Your offset time is: 2024-05-08 13:15:37