예제 #1
0
        void OnDrawGizmos()
        {
            // Don't draw gizmos if this component has been disabled
            if (!this.isActiveAndEnabled)
            {
                return;
            }

            if (InspectedPose == null)
            {
                InspectedPose = GetComponent <HandPoser>();
            }

            if (ShowGizmos && InspectedPose != null)
            {
                Gizmos.color = GizmoColor;
                DrawJointGizmo(ThumbCollider, HandPoser.GetFingerTipPositionWithOffset(InspectedPose.ThumbJoints, FingerTipRadius), FingerTipRadius, GizmoType);
                DrawJointGizmo(IndexFingerCollider, HandPoser.GetFingerTipPositionWithOffset(InspectedPose.IndexJoints, FingerTipRadius), FingerTipRadius, GizmoType);
                DrawJointGizmo(MiddleFingerCollider, HandPoser.GetFingerTipPositionWithOffset(InspectedPose.MiddleJoints, FingerTipRadius), FingerTipRadius, GizmoType);
                DrawJointGizmo(RingFingerCollider, HandPoser.GetFingerTipPositionWithOffset(InspectedPose.RingJoints, FingerTipRadius), FingerTipRadius, GizmoType);
                DrawJointGizmo(PinkyFingerCollider, HandPoser.GetFingerTipPositionWithOffset(InspectedPose.PinkyJoints, FingerTipRadius), FingerTipRadius, GizmoType);
            }
        }
예제 #2
0
 public bool GetMiddleHit(HandPoser poser)
 {
     if (MiddleFingerCollider != null)
     {
         return(LoopThroughJoints(poser.MiddleJoints, ClosedHandPose.Joints.MiddleJoints, MiddleFingerCollider.transform.position, MiddleFingerCollider.Radius));
     }
     else
     {
         return(LoopThroughJoints(poser.MiddleJoints, ClosedHandPose.Joints.MiddleJoints, HandPoser.GetFingerTipPositionWithOffset(poser.MiddleJoints, FingerTipRadius), FingerTipRadius));
     }
 }
예제 #3
0
 public bool GetPinkyHit(HandPoser poser)
 {
     if (PinkyFingerCollider != null)
     {
         return(LoopThroughJoints(poser.PinkyJoints, ClosedHandPose.Joints.PinkyJoints, PinkyFingerCollider.transform.position, PinkyFingerCollider.Radius));
     }
     else
     {
         return(LoopThroughJoints(poser.PinkyJoints, ClosedHandPose.Joints.PinkyJoints, HandPoser.GetFingerTipPositionWithOffset(poser.PinkyJoints, FingerTipRadius), FingerTipRadius));
     }
 }
예제 #4
0
 public bool GetThumbHit(HandPoser poser)
 {
     if (ThumbCollider != null)
     {
         return(LoopThroughJoints(poser.ThumbJoints, ClosedHandPose.Joints.ThumbJoints, ThumbCollider.transform.position, ThumbCollider.Radius));
     }
     else
     {
         return(LoopThroughJoints(poser.ThumbJoints, ClosedHandPose.Joints.ThumbJoints, HandPoser.GetFingerTipPositionWithOffset(poser.ThumbJoints, FingerTipRadius), FingerTipRadius));
     }
 }