Interhaptics SDK for Unity 1.6
Loading...
Searching...
No Matches
OnTriggerAudioCall.cs
Go to the documentation of this file.
1/* ​
2* Copyright (c) 2023 Go Touch VR SAS. All rights reserved. ​
3* ​
4*/
5
6using UnityEngine;
8
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
override void PlayEventVibration()
Method to start the coroutine from outside (if necessary). Plays the haptic effect after the vibratio...
override void Stop()
Call this method to stop the haptic effect.