Hi! I'm trying to make a multiplayer application using Unity 5.4.1p1 with Oculus 1.10.0.308075. Using Unet for network management and use OVRPlayerController prefab as spawn info > player prefab. Problem is, when i create a session and load first scene by clicking a button at lobby scene, center eye anchor transforms x rotation doubles somehow. If i click create session button on a panel (center eye rotation ~= x: 24 y:0 z:0), at the loaded level center eye x rotation becomes ~49. Meanwhile left and right eye cameras x rotations are ok (~24).
There is a known bug in Unity where it latches the current tracking pose in the tracking reference frame for Cameras that are enabled after the Awake method. You can counteract this by setting the pose of OVRCameraRig.trackingSpace. Alternatively, you could pre-create a pool of OVRPlayerController instances in Awake and later assign them instead of spawning them. Does either of those approaches work for your use case?
Setting the rotation of OVRCameraRig.trackingSpace solves visual problem, however OVRCameraRig and CenterEyeAnchor differs and this causes a lapse in movement direction.
It will but hmd have to rotate Y because it is a fps type application. Update: This option only enables / disables rotation of character with hmd. Doesn't affect the distorted synch between OVRCameraRig and modified trackingSpace.
When HmdRotatesY is enabled, the OVRPlayerController rotates to match the CenterEyeCamera's world rotation. To get a different behavior, you would have to modify OVRPlayerController.cs.
I'm a bit confused with why you guys are pinning this on Unity, when the behavior has existed for 2months+ now, and does not occur in either SteamVR or PSVR w/ Unity.
The amount of man-hrs being wasted by this bug must be in the several hundreds by now, if not thousands... come on, fix it. I reported it to these forums back in early September.
Found the solution just now. Just added an empty game object as the parent of CenterEyeAnchor. Only this solves the problem. I don't have to change its rotation or anything. Gaze pointer is at right place. Movement direction is ok.. Funny!! :smiley:
@treefortress, are you saying the bug doesn't occur with Unity 5.4's built-in support for OpenVR or PSVR? It does appear to be in the vendor-agnostic part of Unity's built-in VR support. The problem is that if a new Camera comes online in Start, a frame of tracking data gets applied to its pose before it can latch that pose as its local reference frame for subsequent tracking frames. We are working with Unity to defer the application of tracking data until after the Camera's initial pose has been latched.