Forum Discussion
Smiff
9 years agoHonored Guest
OVRCameraRig bad initial rotation via NetworkManager
Hi all,
Experiencing a bug I can't seem to get past. When I spawn a player prefab of the OVRCameraRig via Unity's built-in Network Manager, it takes the hmd's current rotation and sets it as the initial rotation (0,0,0). Meaning if the hmd is tilted 90 degrees to the right when the player prefab is spawned, sitting straight up then tilts the player's view 90 degrees to the left. Sounds identical to this bug (https://forums.oculus.com/developer/discussion/29675/unity-5-3-ovr-bad-rotation-init), but only occurs after I attach a Network Identity to the OVRCameraRig and spawn it.
Any ideas?
Thanks,
-Smiff
Experiencing a bug I can't seem to get past. When I spawn a player prefab of the OVRCameraRig via Unity's built-in Network Manager, it takes the hmd's current rotation and sets it as the initial rotation (0,0,0). Meaning if the hmd is tilted 90 degrees to the right when the player prefab is spawned, sitting straight up then tilts the player's view 90 degrees to the left. Sounds identical to this bug (https://forums.oculus.com/developer/discussion/29675/unity-5-3-ovr-bad-rotation-init), but only occurs after I attach a Network Identity to the OVRCameraRig and spawn it.
Any ideas?
Thanks,
-Smiff
5 Replies
Replies have been turned off for this discussion
- vrdavebOculus StaffWhat Unity version are you on? Case 768213 was fixed in 5.3.3. I would recommend using 5.3.4p5 or higher.
This may actually be expected behavior. When a new Camera starts up, it latches the current position and yaw of the player's head as the identity in local space. You can adjust it by adding a parent GameObject and moving that. If you're using OVRCameraRig, then try moving the TrackingSpace GameObject in it. - SmiffHonored GuestThanks for replying. I'm using 5.4.0f1 and Oculus utilities 1.6.
The OVRCameraRig I'm using is already under a parent gameObject, but I've tried with and without the parent. Are you suggesting trying to move the TrackingSpace GameObject at runtime after the OVRCameraRig has spawned?
I've also noticed that when the OVRCameraRig (with parent or not) is spawned via the NetworkManager, the CenterEyeAnchor (with the camera on it) moves backward in the TrackingSpace, meaning when I place the tracked controllers as close as possible to the front of the headset, they still appear a foot or so in front of the headset. The exact same player prefab without the NetworkIdentity tracks the controllers perfectly, and the CenterEyeAnchor is in the correct location between the LeftEyeAnchor and the RightEyeAnchor. Images to explain:
------
Sorry for the long and confusing post. I'm just trying to figure out what's going on. I'm sure I could get around this by not using the OVRCameraRig, but it would be inconvenient, especially with the tracked controllers.
Thanks again! - vrdavebOculus Staff> Are you suggesting trying to move the TrackingSpace GameObject at runtime after the OVRCameraRig has spawned?
Yes.
> CenterEyeAnchor (with the camera on it) moves backward in the TrackingSpace
This is because your head is back behind the calibrated origin of your tracking space. You can adjust it by re-running sensor setup in the Oculus client app. After that happens, you can still move TrackingSpace to put the CenterEyeAnchor wherever you want. In fact, you can do it on a per-frame basis, completely zero out tracking, or apply your own.
> when I place the tracked controllers as close as possible to the front of the headset, they still appear a foot or so in front of the headset.
Ok, that does sound like a bug. Thanks for reporting it. I'll try to reproduce it here and let you know when I have a workaround. - SmiffHonored GuestThanks a ton for the info and for looking into it!
- vrdavebOculus StaffI narrowed down the issue and posted a possible workaround at https://forums.oculus.com/developer/discussion/comment/456752/#Comment_456752
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