By boomidi
on Fri, 05/22/2015 - 17:42
Vuforia SDK Version: 4.2.3 -
Description with steps to reproduce:
Hi i was using Vuforia 4.0.1 And everything was fine but when i upgraded to 4.2.3 i ve found problem with camera Direction and im using iphone 6 and Unity 5.0.2.
So My Problem is i have a scene witth AR and Another scene is MainMenu,
So When you go to AR scene everything works fine but when you Change the Camera to Front Camera by using this code:
using UnityEngine; using System.Collections; using System.IO; namespace Vuforia { public class FrontCamera : MonoBehaviour { private bool on = true; public enum VideoBackgroundReflection { DEFAULT, // Allows the SDK to set the recommended reflection settings for the current camera ON, // Overrides the SDK recommendation to force a reflection OFF // Overrides the SDK recommendation to disable reflection } void OnClick () { on = !on; if(on) { CameraDevice.Instance.Stop(); CameraDevice.Instance.Deinit(); TrackerManager.Instance.GetTracker<ObjectTracker>().Stop(); CameraDevice.Instance.Init(CameraDevice.CameraDirection.CAMERA_BACK); QCARRenderer.VideoBackgroundReflection MirrorVideoBackground = QCARRenderer.VideoBackgroundReflection.OFF; CameraDevice.Instance.Start(); TrackerManager.Instance.GetTracker<ObjectTracker>().Start(); } else if(!on) { CameraDevice.Instance.Stop(); CameraDevice.Instance.Deinit(); TrackerManager.Instance.GetTracker<ObjectTracker>().Stop(); CameraDevice.Instance.Init(CameraDevice.CameraDirection.CAMERA_FRONT); QCARRenderer.VideoBackgroundReflection MirrorVideoBackground = QCARRenderer.VideoBackgroundReflection.ON; CameraDevice.Instance.Start(); TrackerManager.Instance.GetTracker<ObjectTracker>().Start(); } } } }
And when you are still in Front Camera try to go another scene(MAinMenu) and come back to AR scene The Rear Camera is Upside down!!!
But if you from Rear Camera go to main menu and come back to AR SCene everything is Fine!!
Please Help me how im gonna get rid of this Upside down view?
Are you guys gonna resolve this thing in your new version??
- Development OS (Mac OS X, Windows, Linux): Unity 5.0.2 OS 10.10.3 - Mobile OS and Version: 8.3 - Mobile Device Manufacturer and Model name: iPhone 6 - Do the Vuforia Sample Applications show the same behavior?:
Camera Direction
ANYONE???? PLEASE HELP ME!!
Camera Direction
Have a look at this FAQ:
https://developer.vuforia.com/forum/faq/unity-how-select-camera-and-mirroring
Camera Direction
I know everythings works good, but when you are in the front camera and quit the AR scene and re enter that scene the front camera video is upside down!
Camera Direction
Have you tried resetting the Camera direction and mirroring in the OnLevelWasLoaded() method of your script:
http://docs.unity3d.com/ScriptReference/MonoBehaviour.OnLevelWasLoaded.html
Camera Direction
Thanks for your help and its working awesomeeeeee!!!
but im getting this error!
Camera Direction
That might happen if the OnSceneWasLoaded is executed before Vuforia has finished initializing;
so, a safer way would be to register an OnQCARStarted callback and execute the code from there: