hello,
I am currently trying to make the A.R. view to adapt the interface orientation for the purpose I am usingarView onPause
then I reinit the view using the following code
QCAR::deinit(); switch (interfaceOrientation) { case UIInterfaceOrientationLandscapeLeft: NSLog(@"%d",ARData.QCARFlags|QCAR::ROTATE_IOS_180); QCAR::onSurfaceChanged(ARData.screenRect.size.height, ARData.screenRect.size.width); QCAR::setInitParameters(QCAR::ROTATE_IOS_180); break; case UIInterfaceOrientationLandscapeRight: NSLog(@"%d",ARData.QCARFlags); QCAR::onSurfaceChanged(ARData.screenRect.size.height, ARData.screenRect.size.width); if (QCAR::setInitParameters(ARData.QCARFlags)==0) NSLog(@"hi"); break; case UIInterfaceOrientationPortrait: NSLog(@"down"); QCAR::onSurfaceChanged(ARData.screenRect.size.width , ARData.screenRect.size.height); QCAR::setInitParameters(QCAR::ROTATE_IOS_90); break; case UIInterfaceOrientationPortraitUpsideDown: NSLog(@"left"); QCAR::onSurfaceChanged(ARData.screenRect.size.width, ARData.screenRect.size.height); QCAR::setInitParameters(QCAR::ROTATE_IOS_270); break; default: break; } int nPercentComplete; do { nPercentComplete = QCAR::init(); } while (0 <= nPercentComplete && 100 > nPercentComplete);
and finally I use arView onResume
this code adapt the camera image in the Background the first time but then I can't go back to the initial orientation (UIInterfaceOrientationLandscapeRight).
here are my spec:
using the native version of QCAR
Mac OS 10.6.8
xcode4
ios 4.3.5
Ipad 2
ps : sorry if my english is bad
I am having the same issue of the ar camera being in landscape even though the app is in portrait with apps created with Unity. I'm seeing this though with devices running both ios 7 and 8. The same app runs correctly on Android. My app is set to auto-rotate between portrait modes only. Any suggestions on what might be the matter?