示例#1
0
 /// <summary>Returns an angle of the finger relative to the palm</summary>
 public float GetRelativeAngle()
 {
     if (m_palm.IsAlive)
     {
         PalmTarget p     = m_palm.Target as PalmTarget;
         float      diffZ = Quaternion.Angle(p.transform.rotation, transform.rotation);
         if (diffZ > 180)
         {
             diffZ = (360.0f - diffZ);
         }
         return(diffZ);
     }
     return(0.0f);
 }
 public PalmGraspedArgs(PalmTarget palm)
 {
     m_palm = palm;
 }
示例#3
0
 public void SetPalm(PalmTarget palm)
 {
     m_palm = new WeakReference(palm);
 }