Jump to content

How to detect device degrees of freedom on the Unity Wave SDK?


Recommended Posts

Hello everyone,

I'm developing a game in Unity that's supposed to be both 6-dof and 3-dof compatible, and should detect the degrees of freedom of the device automatically. I can't find on the Unity Wave SDK any way to detect that. Anyone has any ideas?


Thank you!



Link to comment
Share on other sites

Thank you for the reply, , but I think you may have misunterstood the question.

I need to automatically detect in runtime wether the HMD (not the controller) is 3DoF or 6DoF.

I'm developing a game that I will publish on the Vive Wave platform. When the user runs the game, it should detect wether it's running on a 3DoF or a 6DoF HMD so it can activate the correct functionalities.

I only found this:


But I'm not sure it it's what I'm looking for since it's a function for the native Wave SDK and not the Unity Wave SDK.

Link to comment
Share on other sites

Yes, you're right.

The function is WVR_GetDegreeOfFreedom and it's exported in wvr.cs.

You can receive return value along with different DeviceType.


        [DllImportAttribute("wvr_api", EntryPoint = "WVR_GetDegreeOfFreedom", CallingConvention = CallingConvention.Cdecl)]        public static extern WVR_NumDoF WVR_GetDegreeOfFreedom(WVR_DeviceType type); 
Link to comment
Share on other sites

Thank you, !

That's indeed what we were looking for. We actually had found a similar solution just before I saw your post, but we're using the WaveVR.Instance.is6DoFTracking function, which, if I understand correctly, calls the solution you provided.

Here's what our solution looks like:


        int x = WaveVR.Instance.is6DoFTracking();        if (x == 3)        {            control_3dof = true;        }        else if (x == 6)        {            control_3dof = false;        }        else        {            control_3dof = false;        }


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...