guys,
My question is for my pong game I making for android
How can I code my game to rotate the screen on a phone to landscape view automatically?
I like to have my game to run in landscape view because the screen will be bigger .
thanks in advance.
guys,
My question is for my pong game I making for android
How can I code my game to rotate the screen on a phone to landscape view automatically?
I like to have my game to run in landscape view because the screen will be bigger .
thanks in advance.
Put this in your build.settings
orientation = { default = "landscapeRight", supported = { "landscapeRight", "landscapeLeft"}, },
ok I will thanks for the response
i tried that setting but the objects, such as the paddle and walls don’t rotate well
Is there a setting that affects them as well?
What I told you just sets the canvas as landscape. You need to code your app to run in landscape mode.
how do i do that . I there way to have the objects automatically adjust if a person rotates their phone?
Yes you use the orientation event and the adjust your layout to fit the new canvas dimensions. Corona won’t do it for you.
Put this in your build.settings
orientation = { default = "landscapeRight", supported = { "landscapeRight", "landscapeLeft"}, },
ok I will thanks for the response
i tried that setting but the objects, such as the paddle and walls don’t rotate well
Is there a setting that affects them as well?
What I told you just sets the canvas as landscape. You need to code your app to run in landscape mode.
how do i do that . I there way to have the objects automatically adjust if a person rotates their phone?
Yes you use the orientation event and the adjust your layout to fit the new canvas dimensions. Corona won’t do it for you.