Landscape orientation only

Hi, If you check the built-in “dynamic_orientation” box in game.project it will orientate both landscape and portrait. I wonder how to orientate only in landscape when you rotate your device.

Thanks!

1 Like

Just set your game’s dimensions to a landscape resolution in the project settings. Note though that when running the dev-app, the game will rotate regardless of the setting.

1 Like

Hi, this is how my settings look like: http://puu.sh/kraBw/9a9e57bc1b.png

I tried to build it for iOS in Release Mode but it will still orientate in portrait mode.

You need to uncheck dynamic orientation.

Also note that if you only include a portrait layout in your GUI the engine will use it since it’s the only one it matches against.

Okey, so dynamic orientation is off. I’m building a release mode for iOS but now it doesn’t orientate anywhere. I want it to only orientate in landscape mode when I tilt the phone 180degrees.

This is the profile display: http://puu.sh/ksatv/e9ebc57fc6.png

I see. Defold has no easy config support for that, but you are able to supply a custom “Info.plist” with the orientation options you need. Creating one in Xcode to get the right keys is probably easiest.