Interhaptics SDK for Unity
1.6
Loading...
Searching...
No Matches
Interhaptics
sdk_unity
Interhaptics
Runtime
Samples
OnTriggerEventCall.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
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
}
Interhaptics.Samples.OnTriggerEventCall
Definition
OnTriggerEventCall.cs:12
Interhaptics.Utils.EventHapticSource
Haptic source that plays a haptic effect when triggered by an event. Plays the haptic effect on the s...
Definition
EventHapticSource.cs:20
Interhaptics.Utils.EventHapticSource.PlayEventVibration
override void PlayEventVibration()
Method to start the coroutine from outside (if necessary). Plays the haptic effect after the vibratio...
Definition
EventHapticSource.cs:58
Interhaptics.Samples
Definition
AudioControlGUI.cs:10
Interhaptics.Utils
Definition
ConditionalHideAttribute.cs:7
Generated by
1.11.0