- Home /
problem accessing webcamtexture.videorotation angle on windows phone 8
Hi!
I am developing a mobile app in which I need to view camera feed from a phone's camera onto the plane and I am using webcamtexture to achieve this.
I am rotating the plane by the angle as queried from videoRotationAngle field of the WebCamTexture. This method gives me the correct angles for the Android devices but the problem is while running the app on the windows phone, I am not getting the correct values.
I even tried reading the Screen Orientation but I am getting the Landscape Left orientation no matter how the phone is held.
Could anybody point me to the problem here, Is this the bug in unity or some other problem.
This is the code I am using for rotating the plane:
Quaternion m_BaseRotation;
void start() { m_BaseRotation = transform.rotation; }
void Update() { transform.rotation = mBaseRotation * Quaternion.AngleAxis(360 - mCameraTexture.videoRotationAngle, Vector3.forward); }
Any help is Appreciated. Thanks
Your answer
Follow this Question
Related Questions
Camera Recording for Unity 3D 0 Answers
Unity Webcamtexture Camera very slow when using markerless ar unity asset 0 Answers
How to simultaneously render multiple (web)cam streams in Android 1 Answer
How to get best resolution from phone camera WebCamTexture? 2 Answers
WebCamTexture.devices.Length returning 0 in Unity 2020.3.8f1 0 Answers