Log in or register to post comments

Camera feed flipped on 2/4 device orientations

August 7, 2015 - 3:25am #1

I have an iOS Unity 4.6.5 app built with Vuforia 4.2.3. At runtime on the device the camera feed is fine in Portrait and Landscape Right modes, but in landscape Left and Portrait upsidedown the camera feed is flipped. 

There used to be a QCARUnityPlayer.setOrientation (or something like that) available in Xcode, but I can't find any reference to that anymore. Is this a known bug and/or is there a work around?

AttachmentSize
Image icon Landscape Left122.79 KB
Image icon Landscape Right120.59 KB

Camera feed flipped on 2/4 device orientations

August 20, 2015 - 9:39pm #5

Thank you for sharing your findings and solution.

Camera feed flipped on 2/4 device orientations

August 20, 2015 - 5:10am #4

I've found the issue, and will leave my resolution here for others to find.

Our app has a custom view heirarchy utalising storyboards and an embedded UnityView inside a custom controller. The missing piece of the puzzle was making sure rotation calls were triggering the willRotateTo:ConvertToUnityScreenOrientation(toInterfaceOrientation, 0)  on the UnityView, otherwise the recreateGLESSurface (which in turn calls the Vuforia setSurfaceRecreated()) was always getting the same default orientation, even though it was triggering on a rotation. 

Camera feed flipped on 2/4 device orientations

August 20, 2015 - 3:02am #3

I will take a look at the Books sample app today, but have done some further investigation. I put some Unity UI elements in the scene, and they are rotating correctly, so it is just the camera feed that is flipped. I can get it to be flipped consistantly by rotating the device clockwise through all orientations. Rotating the device anticlockwise results in the correct camera feed orientation.

Camera feed flipped on 2/4 device orientations

August 11, 2015 - 9:38pm #2

Have you tried our Books sample app which supports auto-rotation? I found that it rotated the view correctly in all 4 orientations.

Log in or register to post comments