Display objects layout and orientation

I find this a little confusing…

On iOS, if you want to support all orientations, do scenes need to be able to layout themselves 4 different ways? (portrait, portrait upside down, landscape left and landscape right) [import]uid: 59054 topic_id: 10253 reply_id: 310253[/import]

  • faceUp and faceDown [import]uid: 12482 topic_id: 10253 reply_id: 37397[/import]

Only if you want them to! [import]uid: 26049 topic_id: 10253 reply_id: 37407[/import]

no they are free if you add all four orientations

portrait, portrait upside down, landscape left and landscape right

[import]uid: 12482 topic_id: 10253 reply_id: 37409[/import]

It turns out that I have lots of issues when it comes to the coordinate system and orientation changes.

I understood it all when I had fixed the orientation to “landscape right”, but things get weird and more tedious when orientation starts to change and I need to re-layout my scenes.

In fact, the coordinate system is somewhat under-documented, with a single picture, when more could be useful. (to illustrate object.x, object.y, object.xOrigin, object.xReference, object.xScale, etc.)

On top of that I see some variations in the behavior of display.newImage vs. display.newImageRect. It seems I can position the object created with newImage by assuming its x and y represent its top left corner.
The object created with newImageRect, however, if I assign its x and y, it seems I change the position of its center point.

I need to run a bunch of small tests to figure it all out. [import]uid: 59054 topic_id: 10253 reply_id: 37479[/import]