mmarcati Posted October 30, 2018 Share Posted October 30, 2018 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! Marcelo Link to comment Share on other sites More sharing options...
Tony PH Lin Posted November 1, 2018 Share Posted November 1, 2018 You can refer below link for detail description for 3Dof (rotation only) and 6Dof (rotation + position). https://hub.vive.com/storage/app/doc/en-us/WaveVR_ControllerLoader.html Thanks. Link to comment Share on other sites More sharing options...
mmarcati Posted November 1, 2018 Author Share Posted November 1, 2018 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: https://hub.vive.com/storage/app/doc/en-us/WVR_GetDegreeOfFreedom.html 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 More sharing options...
Tony PH Lin Posted November 2, 2018 Share Posted November 2, 2018 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 More sharing options...
mmarcati Posted November 7, 2018 Author Share Posted November 7, 2018 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.