cancel
Showing results for 
Search instead for 
Did you mean: 

Unity 5.3 OVR bad rotation init

TonyVT
Level 3
I'm a developer for Unity+VR, both Oculus DK2 and GearVR and I use Oculus Utilities v0.1.3.

I've noticed a strage Issue switching from Unity 5.2.2p4 to Unity 5.3.2.p1: Virtual reality initializes/resets at the beginning of the programs in a strange manner. The issue is clearly visible with my GearVR innovator edition (Note 4 version): if I start a program builded with this Version of Unity with the head all tilted, the world will result all strangely inclined. With DK2 I also have some strange behaviour with my particular program, but I can't say you how to replicate this.
We made the tests using 2 GearVR with 2 Note4 and the results are the same. Building with Unity 5.1.x or 5.2.x solves the issue.
In Editor, with DK2 attached, everything works super-fine.

I've searched this problem using google, but with no luck. Have you any suggestions? (Maybe it is a bug)
22 REPLIES 22

Peskanova
Level 2
The same happens to me with GearVR (Note4) on Unity 5.3.2p2.

Only happens if you are using the OVRCameraRig prefab and your Main Camera is the one located in CenterEyeAnchor. It seems to apply the rotation correction on the Z axis twice when you launch the app with the GearVR tilted.

vrdaveb
Oculus Staff
Thanks. This looks like a recent regression in Unity. They are tracking it with case number 768213. It is affecting a lot of people and should be fixed before long.

dignifiedweb
Level 4
I am also experiencing the exact same issue as the previous people stated with the same versions mentioned. So, Unity 5.3.2 p1 and the Oculus Utilities for Unity 5 V0.1.3.0-beta. If I change my scene to only use a regular unity camera and the "Virtual Reality Supported" option enabled, it initializes fine. However, I can't reproduce it in the editor, it's only in my compiled executable where I see the bug in my DK2 (32-bit or 64-bit). I'm also using it under Windows 10.

I found that depending on how you hold the DK2 when it first loads up, it seems to set the rotation of the camera to that. So, even resetting the rotation of the OVRCameraRig to 0 doesn't help, because it thinks the original position of the HMD is a 0 rotation I guess. If you start the app sitting straight up and level, it seems to keep it start level/proper when initializing.

I can potentially provide source code of the issue happening if that helps, but it's really just with the default OVRCamera Rig prefab from the OVR tools. Does anyone have a workaround for this? I'm thinking of setting the rotation of the camera based on an object in the scene or something.

Edit:
I should have googled before posting this, my bad. Looks like it was fixed in version 5.3.3:
https://issuetracker.unity3d.com/issues/oculus-oculus-utilities-plus-unity-5-dot-3-grabs-wrong-initi...

Thanks Vrdaveb for posting the issue tracker number 🙂
Check out my Mobile VR Jam 2015 title Man Overboard! - Try the DK2 Version if you don't have a Gear VR

vrdaveb
Oculus Staff
It was broken in 5.3.2p1 and fixed in 5.3.2p4.

SuppleTeet
Level 2
Well dang, that explains my problem. Guess I have to update Unity again. 😞 I wish this stuff didn't take an entire Unity editor install to fix. :roll:

charnold
Level 3
I'm experiencing this issue again after updating from Unity 5.3.5p6 to 5.4.0f3 (GearVR, Note4).
current GearVR project: 3D Gallery 3

vrdaveb
Oculus Staff
That sounds like a different issue I haven't seen before. Can you share the output of "adb logcat"? How is your project managing the Camera pose?

charnold
Level 3
The 2 logs (only VrApi):

https://dl.dropboxusercontent.com/u/56014495/Dev/5.3.5p6.rtf (no problem)

https://dl.dropboxusercontent.com/u/56014495/Dev/5.4.0f3.rtf (problem "inclined world")

Full logs:

https://dl.dropboxusercontent.com/u/56014495/Dev/5.3.5p6_full.rtf (no problem)

https://dl.dropboxusercontent.com/u/56014495/Dev/5.4.0f3_full.rtf (problem "inclined world")

This problem only occurs in my app's main menu, I'm using a OVRCameraRig object there.
current GearVR project: 3D Gallery 3

vrdaveb
Oculus Staff
The SystemActivities are different between the two logs you sent. Were they taken from the same phone? For multi-scene apps, I'm finding that Unity 5.4.0p1 + SA 1.0.3.4 consistently keeps the Camera's up vector (0,1,0) perpendicular to the real-world ground plane. If you start with the phone facing down, it slowly transitions from the initial ground plane to the correct one. If the issue still occurs for you with the latest SA and Unity 5.4.0p1, can you send me an APK?