Log in or register to post comments

interface orientation issue

September 15, 2011 - 5:45am #1

hello,

I am currently trying to make the A.R. view to adapt the interface orientation for the purpose I am using
arView 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

interface orientation issue

January 16, 2015 - 1:20pm #21

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? 

interface orientation issue

October 30, 2014 - 9:50am #20

Are you running on iOS 8 ?

If so, please check this:

https://developer.vuforia.com/forum/ios/ios-8-xcode-6-and-vuforia-30-compatibility

 

interface orientation issue

October 29, 2014 - 12:29am #19

HI Guys

I have downloaded the sample videoplaybak code .When i run the application in the portrait mode , i see the camera view coming correctly but IN LANDSCAPE MODE , i see camera view is distored. Can you please help me on how to close this issue and also i am runnin on Ipadmini retina dsplay.

 

Thanks in advcane !!

interface orientation issue

June 21, 2012 - 8:44pm #18

Yes it's possible to build apps with either LL or LR orientation. Are  you running Unity 3.5.2? If so, please see - https://ar.qualcomm.at/content/unity-352f2-and-ios-fixed-orientation-causes-distorted-output

 

 

interface orientation issue

June 21, 2012 - 1:17pm #17

I can't seem to follow this discussion. I have the same problem with a stretched camera view. I want my iOS/Android app to have landscape left/right orientation. Is this possible in any way using the Unity extension? Any workaround?

Re: interface orientation issue

November 30, 2011 - 12:58am #16

Hi,

I wanna make a Universal iOS App for iPhone and iPad. The standard landscape view is on the iPhone Landscape Right, on the iPad Landscape Left. How to set up the Unity-QCAR-Project for that?

I tried to do it in the usual manner, but it didn't work as it should. Moreover, a view added to the main in AppController always showed as portrait(!!).

Any help appreciated!
b4

Re: interface orientation issue

November 17, 2011 - 10:24am #15

[QUOTE=MoSR" />Here's the methods found in the Unity doc useful for rotating a GUI

Unity: Rotating the GUI

Unity: Screen Orientation[/QUOTE" />

Duh! Thanks for the brain knock. Was able to implement full auto-rotated, device-orientation correct UI with your AR. Thanks.

Re: interface orientation issue

November 17, 2011 - 3:02am #14

Here's the methods found in the Unity doc useful for rotating a GUI

Unity: Rotating the GUI

Unity: Screen Orientation

Re: interface orientation issue

November 16, 2011 - 10:22am #13

"We'll post a script snippet when it's been approved and tested"
Is this ready for prime-time and if so can you direct me to it?

Re: interface orientation issue

October 12, 2011 - 12:24pm #12
MightyGoober wrote:

Has this been implemented in a current or next release of QCAR Unity?
Looking forward to keeping my GUI supported in both portrait and landscape.

I'm afraid we've not had time from our Unity specialists. However it is a Unity-specific solution - I'm advised that there are code examples on the Unity forum showing how to rotate gui based on device orientation.

Re: interface orientation issue

October 12, 2011 - 11:47am #11
MoSR wrote:

However note that there is one limitation that we haven't provided a script example for - to rotate any overlaid gui. We'll post a script snippet when it's been approved and tested.

As stated in the release notes, arbitrary Auto-rotation is not supported at this time.

Has this been implemented in a current or next release of QCAR Unity?
Looking forward to keeping my GUI supported in both portrait and landscape.

Re: interface orientation issue

October 3, 2011 - 9:41am #10

The symptoms you describe are what we see when, in your Unity project, you have set "Default Orientation" to "Auto Rotation", which we don't support.

When you come back to your iPad version, please double check that you are setting "Default Orientation" to "Landscape Left" or "Portrait".

Re: interface orientation issue

October 3, 2011 - 9:21am #9
MoSR wrote:

Hi iguana_2,

If you set up your Unity project to start in Portrait (or to start in Landscape), then when your iOS project is built, from Xcode set the info.plist for "Supported Interface Orientation" to include the inverted orientation as well.

This will allow the app to start up in Portrait/Portrait Upside-Down (or in Landscape Left/Right), and the Unity splash screen will be oriented the correct way, and QCAR will work as designed.

However note that there is one limitation that we haven't provided a script example for - to rotate any overlaid gui. We'll post a script snippet when it's been approved and tested.

As stated in the release notes, arbitrary Auto-rotation is not supported at this time.

Hi Mosr! Thank you for your help but there is a funny (more or less) news!
I tried 2 days ago to do what you suggest, export the app in portrait mode only and then change the plist file adding the other orientation.

When i export and i publish to ipad its fine but if i add the other orientation to the plist.info....the camera view its stretched exactly as if i did export with automatic orientation....

No prob at the moment, i will publish my app for iphone only and i will do the ipad version when this will work.

Thank you anyway for the support.

Cheers,
Iguana

Re: interface orientation issue

October 3, 2011 - 7:42am #8

Hi iguana_2,

If you set up your Unity project to start in Portrait (or to start in Landscape), then when your iOS project is built, from Xcode set the info.plist for "Supported Interface Orientation" to include the inverted orientation as well.

This will allow the app to start up in Portrait/Portrait Upside-Down (or in Landscape Left/Right), and the Unity splash screen will be oriented the correct way, and QCAR will work as designed.

However note that there is one limitation that we haven't provided a script example for - to rotate any overlaid gui. We'll post a script snippet when it's been approved and tested.

As stated in the release notes, arbitrary Auto-rotation is not supported at this time.

Re: interface orientation issue

September 27, 2011 - 9:06am #7
MoSR wrote:

Thanks for the report Alessandro, we'll take a look.

You're welcome!

I think QCAR is amazing and it works really well, in fact the only problem i found is this one (its a big one only because of Apple policy on ipads).

The marker could be anything, you can move around the marker and its rock solid, some wobbling sometimes but its not a big problem.

Thank you again for this great tool!

Ale.

Re: interface orientation issue

September 27, 2011 - 8:46am #6

Thanks for the report Alessandro, we'll take a look.

Re: interface orientation issue

September 27, 2011 - 6:51am #5
MoSR wrote:

Hi iguana_2,

In the release, both native and Unity versions of our apps are designed to work in the upside-down variant as required by Apple.

This was not the case with the earlier beta - have you tried with the release?

Remember it's only the augmentation that needs to rotate, not the camera view.

Hi MoSR,
i downloaded the latest version but if i export my app using autorotation the camera view is weird, seems like stretched...if i export without autorotation is fine but on the info.plist file i will have only one orientation and when you run the app you will have a splash screen in one direction only and i was already rejected by apple for this.
Not to mention that i have a GUI on the top of the unity window and it need to rotate together with the AR.

Alessandro.

Re: interface orientation issue

September 27, 2011 - 6:37am #4
iguana_02 wrote:

I know that QCAR is not yet compatible with unity rotations but i have to ask before releasing the app. Do you plan to make the QCAR compatible with orientations?

Hi iguana_2,

In the release, both native and Unity versions of our apps are designed to work in the upside-down variant as required by Apple.

This was not the case with the earlier beta - have you tried with the release?

Remember it's only the augmentation that needs to rotate, not the camera view.

Re: interface orientation issue

September 27, 2011 - 6:19am #3

Hi Guys! First of all...thank you for this great engine!

I'm currently developing a series of App that must run on both ipad2 and iphone (and itouch)...the problem is that if my App doesn't rotate at least in two orientations (in my case portrait and upsideDown) apple will reject it.

Apple rejects any app for ipad 1 or 2 that does have only one orientation.

I know that QCAR is not yet compatible with unity rotations but i have to ask before releasing the app. Do you plan to make the QCAR compatible with orientations?

Do you have any temporary fix for this problem.
Thank you.

Alessandro.

Re: interface orientation issue

September 15, 2011 - 7:59am #2

Hi maximelegros,

Do you really need to rotate the camera view? It would then be at a different orientation to the real world. The pose matrix will provide the correct orientation to draw the rotated/inverted 3D world regardless which way up it is.

If you have UI overlaying the EAGLview that can autorotate by attaching a view controller to it, in the usual iOS app way.

If you do use the 3D coordinate system for anything else, or project 3D to 2D then you'll need to compensate for that by observing the current orientation and applying a rotation.

Log in or register to post comments