Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
MattRuiz123's avatar
MattRuiz123
Honored Guest
9 years ago

Oculus equivalent to HTC Vive Input

I downloaded an asset from the Unity Asset Store and the input method being tracked in HTC Vive.

I am developing a game in Unity using the Oculus Rift.

I was wondering how I could translate the following HTC Vive input to the rift controllers:

//Reference to Input events for controllers
private Valve.VR.EVRButtonId gripButton = Valve.VR.EVRButtonId.k_EButton_Grip; //(VRInput)
private Valve.VR.EVRButtonId triggerButton = Valve.VR.EVRButtonId.k_EButton_SteamVR_Trigger;//(VRInput)

I tried using OVRInput.Button for the two above and it seemed to compile. But wasn't able to test it since the following below did not work.

//Use this to get consistent reference to This joystick controller thing
private SteamVR_Controller.Device controller { get { return SteamVR_Controller.Input((int)trackedObj.index); } } //(VRInput)
private SteamVR_TrackedObject trackedObj;

Correct me if I'm wrong, but from what I've read, SteamVR_Controller.Input((int)trackedObj.index) , uses the trackedObj to get the integer representation of the controller in order for easy access to the controller. 

So how would use OVR in such a way?

Thanks!

1 Reply

Replies have been turned off for this discussion
  • I believe i bought the same product.  Well yeah and it says that it works with Oculus. But it has all that code about steam and Vive. And so we can't convert it to oculus? Then it was a waste of money. oh well. lesson learned :)