[iMinib3d] Landscape question

BlitzMax Forums/MiniB3D Module/[iMinib3d] Landscape question

*(Posted 2009) [#1]
Is there a way to get iMinib3d to detect Landscape and Portrait mode and adjust the coordinate system depending on which one is selected. All the apps I am developing with it will use Landscape mode so it makes it quite annoying to have to flip the X and Y coordinates to get the correct placement.


simonh(Posted 2009) [#2]
No, there's no way to do this automatically. The easiest way to do this is to rotate your camera yourself by 90 degrees on the z axis.


*(Posted 2009) [#3]
ah ok doesnt that make the X coordinate Y and the Y the X? :)

Just asking if it was possible to add a command like:
Global::SetDisplayOrientation( UILanscape ); or
Global::SetDisplayOrientation( UIPortrait );

This rotates the camera and inverts the coordinates.


Beaker(Posted 2009) [#4]
Parent everything to a world pivot and rotate that instead.


simonh(Posted 2009) [#5]
ah ok doesnt that make the X coordinate Y and the Y the X? :)


No it doesn't. It just rotates the camera view to match the view of the iPhone (sideways). Moving an object higher on the Y axis, will still result in it appearing to move higher on the screen.


ima747(Posted 2009) [#6]
personally what I do is parent the camera to a pivot, I do all my camera manipulation with that pivot, and if I'm running in landscape I just have to roll the actual camera 90 or -90 (and tweak the zoom as per the example code) and everything else stays the same. no tracking X/Y rotation and no master pivot to complicate all the positional calculations. For things like HUD elements etc, I can just parent those to the camera itself so that regardless of the orientation they stay the same.


*(Posted 2009) [#7]
ah ok thanks guys