cancel
Showing results for 
Search instead for 
Did you mean: 

Documentation or sample files for Oculus Touch

NerdRage
Protege
Hi, does anyone know where the documentation or sample files for Oculus touch are? I could do with some help on how to get started using these in Unity.

Cheers!
7 REPLIES 7

excelynx
Honored Guest
I've been using the public documentation which appears to include Touch since the 1.3 SDK update.

Example: OVRInput.GetLocalControllerPosition(OVRInput.Controller.LTouch);

https://developer.oculus.com/documentation/game-engines/latest/concepts/unity-ovrinput/
VisiR - Virtual Reality Music Visualisation

NerdRage
Protege
Perfect thanks, I cant believe I missed that!
The only thing I am having trouble with is making the touch controllers vibrate

this doesnt seem to work at all using ranges from 0 - 1

    void VibrateRightController(float frequency, float amplitude)
    {
        OVRInput.SetControllerVibration(frequency, amplitude, OVRInput.Controller.RTouch);
    }

NerdRage
Protege
I still cannot get vibrate working at all, it seems totally random when it actually triggers. Does anyone know how this actually works?

It seems that adjusting frequency & amplitude make no difference when I change the values. I've even tried just setting the vibration in the update function, just so I can see how adjusting the variables affects the vibration, but it wont vibrate at all.

Anyone have any thoughts on this?

hoesing
Explorer
It seems kind of related to battery charge level, but I could be wrong.  I've been getting pretty inconsistent results as well.

It'd be nice to have microsecond level control over haptics like on Vive, but I think it might be different underlying tech?

NerdRage
Protege
Im still waiting on an Oculus engineer for support on this, literally cannot make the controllers vibrate and I need it for my game...

mfmf
Oculus Staff
I'm not seeing inconsistent behavior with the function locally, if you get a repro please post it.

I get reliable behavior using this line:
OVRInput.SetControllerVibration(1.0f, 0.25f, OVRInput.Controller.LTouch);
(And then later back to 0.)

Re: current functionality, frequency gets remapped to only two values. < 0.5f maps to 160Hz, and > 0.5f maps to 320Hz.

We'll be adding more robust functionality to the API in an upcoming SDK update.

chooch709
Explorer
One thing that recently tripped me up with controller vibration - the headset actually has to be on your head for the controllers to vibrate.  For us that meant putting the headset on while using our editor to tweak values.  I'm not sure how it works for Unity users, though.

Oh and also a fresh battery is needed, it looks like batteries with low juice cause vibration to just not work.