Exemplo n.º 1
0
 /// <summary> Set ignoreCollision between this layer and another set of rigidbodies. </summary>
 /// <param name="otherLayer"></param>
 /// <param name="ignoreCollision"></param>
 public void SetIgnoreCollision(SG_HandRigidBodies otherLayer, bool ignoreCollision)
 {
     if (otherLayer != null)
     {
         if (this.wristFeedbackScript != null)
         {
             otherLayer.SetIgnoreCollision(this.wristFeedbackScript.gameObject, ignoreCollision);
         }
         for (int f = 0; f < fingerFeedbackScripts.Length; f++)
         {
             if (fingerFeedbackScripts[f] != null)
             {
                 otherLayer.SetIgnoreCollision(fingerFeedbackScripts[f].gameObject, ignoreCollision);
             }
         }
     }
 }
Exemplo n.º 2
0
 /// <summary> Ignore collision between this layer and another. </summary>
 /// <param name="rigidBodies"></param>
 /// <param name="ignoreCollisions"></param>
 public override void SetIgnoreCollision(SG_HandRigidBodies rigidBodies, bool ignoreCollisions)
 {
     if (rigidBodies != null)
     {
         if (palmTouch != null)
         {
             rigidBodies.SetIgnoreCollision(this.palmTouch.gameObject, ignoreCollisions);
         }
         if (thumbTouch != null)
         {
             rigidBodies.SetIgnoreCollision(this.thumbTouch.gameObject, ignoreCollisions);
         }
         if (indexTouch != null)
         {
             rigidBodies.SetIgnoreCollision(this.indexTouch.gameObject, ignoreCollisions);
         }
         if (middleTouch != null)
         {
             rigidBodies.SetIgnoreCollision(this.middleTouch.gameObject, ignoreCollisions);
         }
     }
 }