cancel
Showing results for 
Search instead for 
Did you mean: 

Native Quest haptics / vrapi_SetHapticVibrationBuffer

mcc
Expert Protege
I am adding haptics to my Native SDK project for Go/Quest.
I find in the headers a vrapi_SetHapticVibrationSimple where you pass in 0-1. So that's straightforward.
However I also find a vrapi_SetHapticVibrationBuffer that takes a start time, a number of samples, "true if this is the end of the buffers being sent", and a series of unsigned char samples.
How do I use this? This looks very useful but I am looking hard through the Native Quest documentation and there is no documentation for haptics for the Native API.

Things I would like to know:
* Can I use this feature? The only reference I find to haptics buffers on the website is this older documentation for Oculus Touch on desktop, which says the feature is deprecated. But it is used in the VrController sample in the native SDK so I assume it is deprecated on Desktop only and not Mobile.
* Is there an upper bound on the allowed duration/length of a ovrHapticBuffer?
* What is the exact interpretation of the sample values? 0 is no intensity, 255 is max intensity, I assume?
* What is the memory ownership of the HapticBuffer member of ovrHapticBuffer? Will vrapi retain a pointer to this buffer? May I safely free/alter the buffer immediately after calling vrapi_SetHapticVibrationBuffer?
* Is there a value (such as 0) for BufferTime which will be interpreted as "begin playing immediately"?
* Can I use this feature to set a vibration frequency? If so, how? The Unity and Unreal Quest documentation have "frequency" parameters on the haptics methods for those APIs but vrapi_SetHapticVibrationSimple does not.
* Should I expect the feature to work on Go? Are there differences in the haptic behavior between Go and Quest?
1 REPLY 1

mcc
Expert Protege
With some more digging I found that the ovrInputTrackedRemoteCapabilities struct contains a sample duration and a "max samples" for the ovrHapticBuffer struct. So that answers one question, but I would still like to know the answer to the others…