Log in or register to post comments

Pausing causes QCARBehaviour orientation issues

September 23, 2012 - 1:55pm #4

Here's my problem:  In my app I pause Unity and bring up a native iOS fullscreen video player.  If I re-orient the device after Unity is paused, when returning to Unity, I guess QCAR thinks the orientation is still set to what it was when Unity was paused.  The camera view gets mirrored and UI overlays get skewed until you rotate the device back to the orientation it was in when you first paused it, then the camera skewed view goes away it returns to looking correct.  Is there any function anywhere that will tell QCARBehaviour to check for a new orientation when coming back into Unity from a paused state? Or any other work-around available?

Pausing causes QCARBehaviour orientation issues

September 24, 2012 - 3:41am #3

Hi patch24

Can I just check which version of Unity/iOS you are using?

 If I re-orient the device after Unity is paused, when returning to Unity

Do you return the orientation of the device from native back to what it was in Unity?

What you might be able to do is experiment with QCARUnityPlayer::getInstance().QCARSetOrientation(orientation);

..in order to get the effect you desire.

You can look for this in AppController.mm to see some examples of how it works - basically it just shadows the existing Unity calls for orientation and sures that the two are in sync.

HTH

N

 

 

Pausing causes QCARBehaviour orientation issues

September 24, 2012 - 10:28am #2

Hey Nalin, I'm using Unity 3.5.5f3, ios version 5.1, vuforia 1.5.9.  I had changed that line in my AppController.mm to reorient but it doesn't seem to work.

I'm not manually resetting orientation when returning to Unity from the paused state.

Pausing causes QCARBehaviour orientation issues

September 25, 2012 - 3:03am #1

Hi patch24

I meant use that line from AppController.mm when you return from the native iOS player

If from Unity you hand control to a native iOS video player and then hand back control, then there may be a good chance it gets confused particularly if the user rotates the device from portrait to landscape.

If you can output via the debug console the orientation of Unity and QCAR before handing over and also when returning, then you could probably work out enough test cases to give you coverage, and then set the orientation when it comes back.

Could this work?

Log in or register to post comments