How to detect if vive headset is idle
HI!
I am trying to figure out how can I detect if the vive headset has been idle for a x-amount of time. When the time has passed, I would then like to reset the scene.
I found for example this from google:
static bool GetIsUserPresent()
{
#if ENABLE_OVR_INPUT
if (VRSettings.loadedDeviceName == "Oculus")
return OVRPlugin.userPresent;
#endif
#if ENABLE_STEAMVR_INPUT
if (VRSettings.loadedDeviceName == "OpenVR")
return OpenVR.System.GetTrackedDeviceActivityLevel(0) == EDeviceActivityLevel.k_EDeviceActivityLevel_UserInteraction;
#endif
return true;
}
But I don't understand how this can be put to use.. Could someone point me in the right direction??
Thank you!
Comment
Your answer

Follow this Question
Related Questions
Survival Shooter Error CS0120 1 Answer
How to make a 2D array of buttons? 2 Answers
ios app crashes on start 0 Answers
The referenced script on the behaviour is missing error help plz 2 Answers
Issues w/ Creating a target system 2 Answers