Forum Discussion
TonyVT
10 years agoProtege
Unity 5.3 OVR bad rotation init
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)
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
Replies have been turned off for this discussion
- PeskanovaHonored GuestThe 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. - vrdavebOculus StaffThanks. 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.
- dignifiedwebExpert ProtegeI 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-initial-pose
Thanks Vrdaveb for posting the issue tracker number :) - vrdavebOculus StaffIt was broken in 5.3.2p1 and fixed in 5.3.2p4.
- AnonymousWell 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:
- charnoldExplorerI'm experiencing this issue again after updating from Unity 5.3.5p6 to 5.4.0f3 (GearVR, Note4).
- vrdavebOculus StaffThat 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?
- charnoldExplorerThe 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. - vrdavebOculus StaffThe 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?
- charnoldExplorerAh sorry, the full-logs were taken from the same phone, but not on the same day. I didn't notice, the SA were updated in the meantime. The behavior "inclined world" didn't change.
So:
5.3.5p6 + SA 1.0.3.3 = no problem
5.3.5p6 + SA 1.0.3.4 = no problem
5.4.0f3 + SA 1.0.3.3 = problem "inclined world"
5.4.0f3 + SA 1.0.3.4 = problem "inclined world"
and: 5.4.0p1 + SA 1.0.3.4 = problem "inclined world"
https://dl.dropboxusercontent.com/u/56014495/Dev/5.4.0p1/3DGallery3.apk
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 6 months ago
- 2 years ago
- 4 years ago