Exemple #1
0
        public void OnDrawRuntimeGizmos(RuntimeGizmoDrawer drawer)
        {
            switch (gizmoType)
            {
            case GizmoType.InteractionStatus:
                if (_interactionBehaviour.IsBeingGrasped)
                {
                    drawer.color = Color.green;
                }
                else if (GetComponent <Rigidbody>().IsSleeping())
                {
                    drawer.color = Color.gray;
                }
                else
                {
                    drawer.color = Color.blue;
                }
                break;

            case GizmoType.ActivityDepth:
                drawer.color = Color.HSVToRGB(Mathf.Max(0, _timeToLive) / (_manager.MaxDepth * 2.0f), 1, 1);
                break;
            }

            drawer.DrawColliders(gameObject);
        }
Exemple #2
0
        public void OnDrawRuntimeGizmos(RuntimeGizmoDrawer drawer)
        {
            if (!drawDebug || !this.enabled || !gameObject.activeInHierarchy)
            {
                return;
            }

            drawer.color = LeapColor.cerulean.WithAlpha(0.5f);
            drawer.DrawColliders(this.gameObject, useWireframe: false, drawTriggers: true);
        }
Exemple #3
0
 public void OnDrawRuntimeGizmos(RuntimeGizmoDrawer drawer)
 {
     drawer.color = _curRigidHandColor;
     if (_rigidHandL.IsTracked)
     {
         drawer.DrawColliders(_rigidHandL.gameObject);
     }
     if (_rigidHandR.IsTracked)
     {
         drawer.DrawColliders(_rigidHandR.gameObject);
     }
     drawer.color = _curInteractionHandColor;
     if (_interactionHandL.IsTracked)
     {
         drawer.DrawColliders(_interactionHandL.GetHandParent());
     }
     if (_interactionHandR.IsTracked)
     {
         drawer.DrawColliders(_interactionHandR.GetHandParent());
     }
 }
Exemple #4
0
 public void OnDrawRuntimeGizmos(RuntimeGizmoDrawer drawer)
 {
     drawer.DrawColliders(this.gameObject);
 }
Exemple #5
0
 public void OnDrawRuntimeGizmos(RuntimeGizmoDrawer drawer)
 {
     drawer.color = color;
     drawer.DrawColliders(this.gameObject, true, true);
 }