Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anyway to detect if HMD is connected? #115

Open
Albertolopezs opened this issue Apr 15, 2021 · 2 comments
Open

Anyway to detect if HMD is connected? #115

Albertolopezs opened this issue Apr 15, 2021 · 2 comments

Comments

@Albertolopezs
Copy link

Hello,

I'm developing a 3D game which offers both VR and desktop environment. I want to allow the users to select the mode they want to play but only if the HMD is connected. Is there any way to detect it?

Thanks in advance.

@BastiaanOlij
Copy link
Member

Not at the moment, I do believe OpenVR has a way for us to query this. I will have to investigate and see if I can implement something for it.

@CrispyPin
Copy link
Contributor

The function is vr::VR_IsHmdPresent()
https://github.com/ValveSoftware/openvr/wiki/API-Documentation#other-functions

It does not guarantee that vr can start, but is still the fastest way to check. The docs states that this is exactly the kind of use case for it though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants