UxrUnityXRControllerInput.CreateHapticBufferFromAudioClip Method

Using an audio file, creates a haptic samples buffer that can be sent for feedback. This code is based on the Oculus SDK (OVRHaptics.cs).

Namespace: UltimateXR.Devices.Integrations
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

protected byte[] CreateHapticBufferFromAudioClip(
	InputDevice inputDevice,
	AudioClip audioClip
)

Parameters

 

inputDevice
Type: InputDevice
Unity input device that will be the feedback target
audioClip
Type: AudioClip
Audio clip whose audio sample will be used to create haptics

Return Value

Type: Byte[]
Buffer that can be sent to the device as haptic feedback

See Also

Reference

UxrUnityXRControllerInput Class
UltimateXR.Devices.Integrations Namespace