Log in or register to post comments

Starting with Portrait Orientation, at runtime change to Landscape Left on iOS?

July 27, 2012 - 7:52am #1

I change my Screen Orientaton from Portrait to LandscapeLeft at runtime with Screen.orientation = ScreenOrientation.LandscapeLeft.

On Android it works great. On my iPhone 3GS has the AR camera a wrong orientation, but the keyboard has the right orientation. 

How can I rotate the video stream?

Starting with Portrait Orientation, at runtime

August 5, 2012 - 8:56pm #17

Awesome !

Glad to be of help :)

Solved

August 3, 2012 - 3:39am #16

I solved the problem. I used in HandleOrientationRequest() in AppController.mm, the function call 
QCARUnityPlayer::getInstance().QCARSetOrientation(targetOrient); over the function call UnitySetScreenOrientation(targetOrient).

Thanks for the tip, NalinS.

at runtime change to Landscape Left on iOS?

August 3, 2012 - 2:29am #15

@DavidBeard

The runtime orientation change works with auto-rotation (without the same distortion apparent), without changes in AppController.mm.

 

if I put the AR scene in an extra scene and and calling Screen.orientation = ScreenOrientation.LandscapeLeft before I call the new scene. It does not work anyway.

Starting with Portrait Orientation, at runtime change

August 2, 2012 - 9:47pm #14

double post deleted... 

Starting with Portrait Orientation, at runtime change

August 2, 2012 - 9:42pm #13

Hi Russel

This does look like the same orientation problem that was fixed in 3.5.3f3 so it should not recur in 3.5.4, though I have not personally tested this as 3.5.4 is a very new release.

Most use cases do not have applications forcibly change the orientation at run-time.  If you do, then please look at the code in AppController.mm where it calls the QCAR::setOrientation method upon autorotation.  If you are able to replicate this functionality then it should solve the orientation problems you are experiencing.

HTH

N

Starting with Portrait Orientation

August 2, 2012 - 12:17pm #12

They've asked if you are seeing the same when the project is set-up for auto-rotation - is the same distortion apparent?

Also, does didRotateFromInterfaceOrientation get called (AppController.mm in the Xcode project generated by Unity) in response to the call to Screen.orientation = ScreenOrientation.LandscapeLeft in Unity?

 

at runtime change to Landscape Left on iOS?

August 2, 2012 - 7:35am #11

Thank you. Unfortunately I have no old versions.

Starting with Portrait Orientation

August 2, 2012 - 7:26am #10

Yes I understand. Let me check with our iOS gurus. In the interim, I'd advise checking with Unity to determine if any new issues have cropped up between XCode 4.4 and Unity 3.5.4f1.

Do you have an earlier version of XCode a/o Unity to test with?

* It's a good idea to maintain known-good installations of these, in case of compatibility problems.

at runtime change to Landscape Left on iOS?

August 2, 2012 - 6:51am #9

@DavidBeard

Do you understand my problem with this picture? The AR View is already loaded when calling Screen.orientation = ScreenOrientation.LandscapeLeft.

Screenshot

August 1, 2012 - 1:47am #8

http://imageshack.us/photo/my-images/52/landscapeleft.png/

If I move my iPhone to the top, the video stream moves to the right. The image is also distorted.

Starting with Portrait Orientation

July 31, 2012 - 10:36am #7

Can you post a screen grab of what you're seeing after changing the orientation?

no idea? I would be very

July 31, 2012 - 9:01am #6

no idea?

I would be very grateful for a quick help. Otherwise I must rebuild my GUI :(.

Do you also have the

July 30, 2012 - 2:21am #5

Do you also have the problem?

Can I use the VideoTextureBehaviour class for the right video image rotation?

I use Xcode Version 4.4 and

July 29, 2012 - 3:53am #4

I use Xcode Version 4.4 and Unity 3.5.4f1. 

@NalinS: This bug should no longer be in this version of Unity, right? Does it work for you?

In my player settings I use portrait and at runtime i change the orientation to landscape left with a button click.

Starting with Portrait Orientation, at runtime change

July 27, 2012 - 10:35am #3

Xcode?

July 27, 2012 - 9:18am #2

What version of XCode are you using?  This bug is a known issue with XCode, be sure you are using the latest version.

Log in or register to post comments