Interhaptics SDK for Unity
1.6
Loading...
Searching...
No Matches
Interhaptics
sdk_unity
Interhaptics
Runtime
Samples
OnTriggerAudioCall.cs
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2023 Go Touch VR SAS. All rights reserved.
3
*
4
*/
5
6
using
UnityEngine;
7
using
Interhaptics.Utils
;
8
9
namespace
Interhaptics.Samples
10
{
11
public
class
OnTriggerAudioCall
: MonoBehaviour
12
{
13
[SerializeField]
14
private
AudioHapticSource
audioHapticSource;
15
16
private
void
OnTriggerEnter(Collider other)
17
{
18
audioHapticSource.
PlayEventVibration
();
19
}
20
21
private
void
OnTriggerExit(Collider other)
22
{
23
audioHapticSource.
Stop
();
24
}
25
}
26
}
27
Interhaptics.Samples.OnTriggerAudioCall
Definition
OnTriggerAudioCall.cs:12
Interhaptics.Utils.AudioHapticSource
Definition
AudioHapticSource.cs:18
Interhaptics.Utils.AudioHapticSource.PlayEventVibration
override void PlayEventVibration()
Method to start the coroutine from outside (if necessary). Plays the haptic effect after the vibratio...
Definition
AudioHapticSource.cs:73
Interhaptics.Utils.AudioHapticSource.Stop
override void Stop()
Call this method to stop the haptic effect.
Definition
AudioHapticSource.cs:65
Interhaptics.Samples
Definition
AudioControlGUI.cs:10
Interhaptics.Utils
Definition
ConditionalHideAttribute.cs:7
Generated by
1.11.0