I am working with Unity and the Mixed Reality Toolkit. My issue is that "HP Reverb G2" is not detected using Windows Mixed Reality, but it works if I parse with SteamVR
. My goal is to detect if the headset is on my head without using SteamVR
.
My current solution, which doesn't work, is as follows:
public static bool IsHMDMounted()
{
if (headDevice == null || headDevice.isValid == false)
{
headDevice = InputDevices.GetDeviceAtXRNode(XRNode.Head);
}
if (headDevice != null)
{
bool presenceFeatureSupported = headDevice.TryGetFeatureValue(CommonUsages.userPresence, out bool userPresent);
if (headDevice.isValid && presenceFeatureSupported)
{
return userPresent;
}
else
{
return false;
}
}
else
{
return false;
}
}