Jump to content

WVR_Event when headset is removed and put back on by user


Romain

Recommended Posts

On 8/23/2023 at 4:10 PM, VIVE_chengnay said:

To clarify your question,

You get the event(status of proximity sensor) and do Application.Quit().

I assume you will get status from proximity sensor right after you took off the HMD?

You mentioned three more mins(should be the same as I mentioned above that OnApplicationPause will take 3 mins to trigger after HMD off).

May I know the LBE settings, what is this about?

Is this settings in Vive headset?

Hi I tried to use Common.userPresence and tried to use the SystemEvent, and could not get the information of when the user removes the headset, I'm using a FOcus 3 but I can do a test on a XR Elite as well:


void Start()
{
    Wave.Essence.Events.SystemEvent.Listen(WVR_EventType.WVR_EventType_DeviceResume, OnEventResume1);
    Wave.Essence.Events.SystemEvent.Listen(WVR_EventType.WVR_EventType_DeviceSuspend, OnEventResume2);
    Wave.Essence.Events.SystemEvent.Listen(WVR_EventType.WVR_EventType_DeviceInfoUpdate, OnEventResume3);
    Wave.Essence.Events.SystemEvent.Listen(WVR_EventType.WVR_EventType_RenderingToBePaused, OnEventResume4);
    Wave.Essence.Events.SystemEvent.Listen(WVR_EventType.WVR_EventType_RenderingToBeResumed, OnEventResume5);
}

private void OnEventResume1(WVR_Event_t systemEvent)
{
    Debug.LogError("--------------- CALLED EVENT 1");
}
private void OnEventResume2(WVR_Event_t systemEvent)
{
    Debug.LogError("--------------- CALLED EVENT 2");
}
private void OnEventResume3(WVR_Event_t systemEvent)
{
    Debug.LogError("--------------- CALLED EVENT 3");
}
private void OnEventResume4(WVR_Event_t systemEvent)
{
    Debug.LogError("--------------- CALLED EVENT 4");
}
private void OnEventResume5(WVR_Event_t systemEvent)
{
    Debug.LogError("--------------- CALLED EVENT 5");
}

 

Link to comment
Share on other sites

On 8/23/2023 at 8:47 AM, VIVE_chengnay said:

Hi @JulienActiveMe,

May I know which Wave SDK version did you install? Thanks!

Sure! To verify compatibility and operation, validating the installed Wave SDK version can provide useful problem information.

Link to comment
Share on other sites

Hi @Renan Viewport,

Not sure if below solution OK for you,

It required to install Unity Input System plugin.

bool IsUserPresence()
{
	if (ProximitySensor.current != null)
	{
		if (!ProximitySensor.current.IsActuated())
			InputSystem.EnableDevice(ProximitySensor.current);

		return ProximitySensor.current.distance.ReadValue() < 1;
	}

	return false;
}

 

On 8/23/2023 at 4:25 PM, JulienActiveMe said:

3 minutes is a lot, is there a way I can put the HMD to sleep from script?

Hi @JulienActiveMe,

I forgot to reply your question.

Sorry about that and please try the solution.

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...