I’m working on a game app which only should use supportedOrientations(LANDSCAPE_ANY) but when I turn my iPad Air2 (iOS 8.x up to latest 9.2.1, Codea: 2.? up to current 2.3.2(61)), it still shows portrait mode when turning the device (while running inside Codea IDE on iOS).
Yap, iPad Air1/2 seems to be the only obvious difference, but…
I used any (reliable) search-engine: Found nothing adequate.
I used all available neurons: No success.
I agreed with myself, that I did something wrong.
Anyone who can enlighten my lonesome life? :neutral:
@HeiKoDea Try running this and see if it stays in LANDSCAPE_ANY mode as you rotate the iPad. It’s good to try the least amount of code to track down a problem. This works on my Ipad Air.
supportedOrientations(LANDSCAPE_ANY)
displayMode(FULLSCREEN)
function setup()
end
function draw()
background(255)
sprite("Cargo Bot:Cargo Bot Title",WIDTH/2,HEIGHT/2)
end
Do you call supportedOrientations in any other part of the code, or any dependency? (Though dependency is compiled first I think, so would be overridden)
Of course, “It’s good to try the least amount of code to track down a problem” is the way to go and I learned this since the seventies when I started to develop software for my in-house needs. (And my brain)
supportedOrientations(LANDSCAPE_ANY) just never worked over here. Neither on iOS 8.x up to latest 9.2.1, Codea: 2.? up to current 2.3.2(61) as mentioned in my OP.
Whatever the reason is, I took countless hours to understand (and I should be able after learning 25+ langs in my life - Sorry for my arrogance) without a solution to this prop.
can you pm/send me your code? so I can test it properly?
Edit: Yeah ^.^ I’m happy to have it - the bigger screen alone was worth they buy - but I actually got it because of the pencil … still, all this is very costly
@se24vad:
“can you pm/send me your code? so I can test it properly?”
Would love to send it to you for proper testing but it’s about some 10k lines now, plus loads of 3d/2d graphics, worth of not an unessential part of my life and intentions I’m working on since a year in my spare time. (My usual 24/7 job is being the owner of a filmmakers agency. Well, life is strange. PM me for further communications if you like)
My dev iPad Air2 usually stands landscape in an Otter-Box. The app I’m creating makes only sense and is designed for landscape. If I turn this device, it rotates the view canvas, even I locked rotating with supportedOrientations(LANDSCAPE_ANY).
Don’t want to be a dude but this game has now over 10k lines of code working perfect, except supportedOrientations(LANDSCAPE_ANY) just doesn’t work as claimed and expected.
@HeiKoDea Run this code and rotate your iPad. Does the value that shows match the value with the round home button in the 4 different positions.
displayMode(FULLSCREEN)
function setup()
end
function draw()
background(0)
fill(255)
text(str,WIDTH/2,HEIGHT/2+30)
text("round home button on bottom = 0",WIDTH/2,HEIGHT/2-30)
text("round home button on right = 3",WIDTH/2,HEIGHT/2-60)
text("round home button on top = 1",WIDTH/2,HEIGHT/2-90)
text("round home button on left = 2",WIDTH/2,HEIGHT/2-120)
end
function orientationChanged(orien)
str=orien
end