Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug VR head presence not working properly

Discussion in 'VR' started by NewMagic-Studio, Nov 23, 2023.

  1. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    448
    Hi,
    I am using Unity 2021.3.8 and i tried tracking head presence but it is not working properly. It detects presence even if i am not using the Oculus quest

    I am using this code :

    Code (CSharp):
    1.             if (!headSet.isValid) headSet = InputDevices.GetDeviceAtXRNode(XRNode.Head);
    2.             headSet.TryGetFeatureValue(UnityEngine.XR.CommonUsages.userPresence, out bool presence);
    3.             _userPresence = presence;
     
  2. unity-chris

    unity-chris

    Unity Technologies

    Joined:
    Nov 10, 2022
    Posts:
    29
    Hello,

    Can you provide us with more information about what is the result you expecting when calling the function? Also, can you provide information on which packages and its versions are you using in the project.