Interhaptics SDK for Unity 1.6
Loading...
Searching...
No Matches
OnTriggerEventCall.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 OnTriggerEventCall : MonoBehaviour
12 {
13 [SerializeField]
14 private EventHapticSource eventHapticSource;
15 [SerializeField]
16 private float delayPlayTime = 2.0f;
17
18 private void OnTriggerEnter(Collider other)
19 {
20 eventHapticSource.vibrationOffset = delayPlayTime;
21 eventHapticSource.PlayEventVibration();
22 }
23 }
24}
Haptic source that plays a haptic effect when triggered by an event. Plays the haptic effect on the s...
override void PlayEventVibration()
Method to start the coroutine from outside (if necessary). Plays the haptic effect after the vibratio...