Hey everyone, I’ve been working on a multiplayer game and I have been sending builds to a friend with a WMR headset to test them. The problem is that for some reason the only part of 6dof tracking working is the head rotation. My builds work just fine when I build it to my quest and pc (using link). The last build I sent him was built using 2019.4.6f1 and the platform was set for PC, Mac & Linux Standalone. The build would open in VR but he was only able to look around with no movement, controller inputs worked too. This is the code I’m using to get positions:
var heads = new List<UnityEngine.XR.InputDevice>();
UnityEngine.XR.InputDevices.GetDevicesAtXRNode(UnityEngine.XR.XRNode.Head, heads);
var leftHandDevices = new List<UnityEngine.XR.InputDevice>();
UnityEngine.XR.InputDevices.GetDevicesAtXRNode(UnityEngine.XR.XRNode.LeftHand, leftHandDevices);
var rightHandDevices = new List<UnityEngine.XR.InputDevice>();
UnityEngine.XR.InputDevices.GetDevicesAtXRNode(UnityEngine.XR.XRNode.RightHand, rightHandDevices);
UnityEngine.XR.InputDevice head = new UnityEngine.XR.InputDevice();
if (heads.Count == 1)
{
head = heads[0];
}
UnityEngine.XR.InputDevice leftHand = new UnityEngine.XR.InputDevice();
if (leftHandDevices.Count == 1)
{
leftHand = leftHandDevices[0];
}
UnityEngine.XR.InputDevice rightHand = new UnityEngine.XR.InputDevice();
if (rightHandDevices.Count == 1)
{
rightHand = rightHandDevices[0];
}
head.TryGetFeatureValue(UnityEngine.XR.CommonUsages.devicePosition, out Vector3 headPosition);
head.TryGetFeatureValue(UnityEngine.XR.CommonUsages.deviceRotation, out Quaternion headRotation);
leftHand.TryGetFeatureValue(UnityEngine.XR.CommonUsages.devicePosition, out Vector3 leftPosition);
leftHand.TryGetFeatureValue(UnityEngine.XR.CommonUsages.deviceRotation, out Quaternion leftRotation);
rightHand.TryGetFeatureValue(UnityEngine.XR.CommonUsages.devicePosition, out Vector3 rightPosition);
rightHand.TryGetFeatureValue(UnityEngine.XR.CommonUsages.deviceRotation, out Quaternion rightRotation);
I’ve also tried legacy code:
PoseDataSource.GetDataFromSource(TrackedPoseDriver.TrackedPose.Center, out Pose head);
PoseDataSource.GetDataFromSource(TrackedPoseDriver.TrackedPose.LeftPose, out Pose leftHand);
PoseDataSource.GetDataFromSource(TrackedPoseDriver.TrackedPose.RightPose, out Pose rightHand);
Anyone have any ideas? Could It just be that I need to build for UWP? If I need to build for UWP why does the genaric build still halfway work?