Jump to content

Unity HTC Vive userPresence Sensor - Proximity Sensor


HellScript

Recommended Posts

Hi, Im using Unity and i'm trying to get if user is wearing the headset. I found one solution but i need to wait 15 seconds to get the false value, is not working like real time sensor....

Any idea to fix it?

 

InputDevice headDevice = InputDevices.GetDeviceAtXRNode(XRNode.Head);

if (headDevice.isValid == false) return;

bool presenceFeatureSupported = headDevice.TryGetFeatureValue(CommonUsages.userPresence, out bool userPresent);
Debug.Log("DATA: " + userPresent);

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...