Fixed Landscape Orientation

Hi there, so far i've built my game into a "portrait" orientation and I really want the game to be only playable in "landscape" orientation. I have done my research a little bit and it seems the way to do that is to change the build.settings?

1
2
3
4
5
6
7
8
9
10
11
settings =
{
        orientation =
        {
                default = "landscapeRight",
                supported =
                {
                        "landscapeLeft", "landscapeRight", "portrait", "portraitUpsideDown",
                },
        },
}

1
2
3
4
5
6
7
8
9
10
11
settings =
{
        orientation =
        {
                default = "landscapeRight",
                supported =
                {
                        "landscapeLeft", "landscapeRight",
                },
        },
}

hi ok but why when i try to see it in corona simulator the game can be still played in portrait orientation?

and why the game doesn't automatically convert to landscape? I built the game (previously) on portrait orientation, now if i rotate 90 degree in corona simulator, the objects wouldn't rotate to follow the landscape orientation. does it mean i have to replace the whole images again?

If you mean that you coded a game in portrait then yes, you need to reposition things for landscape.

This is because in portrait mode an object could have a y of 400, which would appear off the screen in landscape.

You may want to check out some of the sample code, we have some focusing on orientation changes in CoronaSDK > SampleCode > Interface

Peach :)

views:2157 update:2012/2/12 11:34:30
corona forums © 2003-2011