Tanoda
HandEnableDisable.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9using UnityEngine;
10using System.Collections;
11using System;
12using Leap;
13
14namespace Leap.Unity{
16 public GameObject Hand;
17 protected override void Awake() {
18 // Suppress Warnings Related to Kinematic Rigidbodies not supporting Continuous Collision Detection
19 #if UNITY_2018_3_OR_NEWER
20 Rigidbody[] bodies = GetComponentsInChildren<Rigidbody>();
21 foreach (Rigidbody body in bodies) {
22 if (body.isKinematic && body.collisionDetectionMode == CollisionDetectionMode.Continuous) {
23 body.collisionDetectionMode = CollisionDetectionMode.ContinuousSpeculative;
24 }
25 }
26 #endif
27
28 base.Awake();
29 //gameObject.SetActive(false);
30 Hand.SetActive(false);
31 }
32
33 protected override void HandReset() {
34 Hand.SetActive(true);
35 }
36
37 protected override void HandFinish() {
38 Hand.SetActive(false);
39 }
40
41 }
42}
The Hand class reports the physical characteristics of a detected hand.
Definition: Hand.cs:26
A component to be attached to a HandModelBase to handle starting and ending of tracking....