Spelunx Cavern SDK
Loading...
Searching...
No Matches
TrackingArea.cs
Go to the documentation of this file.
1
using
UnityEngine;
2
3
public
class
TrackingArea
: MonoBehaviour
4
{
5
private
bool
crouching =
false
;
6
7
public
bool
Crouching
()
8
{
9
return
crouching;
10
}
11
12
private
void
OnTriggerEnter(Collider other)
13
{
14
if
(other.CompareTag(
"CrouchArea"
))
15
{
16
Debug.Log(
"Crouching"
);
17
crouching =
true
;
18
}
19
}
20
21
private
void
OnTriggerExit(Collider other)
22
{
23
if
(other.CompareTag(
"CrouchArea"
))
24
{
25
Debug.Log(
"Not crouching"
);
26
crouching =
false
;
27
}
28
}
29
}
TrackingArea
Definition:
TrackingArea.cs:4
TrackingArea.Crouching
bool Crouching()
Definition:
TrackingArea.cs:7
CavernSDK
Packages
com.spelunx.cavern.vive-trackers
Samples~
Sample Scenes
ETC CAVERN Interaction Demo
Scripts
TrackingArea.cs
Generated by
1.9.6