Exemplo n.º 1
0
    public void TouchObject(GameObject obj)
    {
        IsTouchedObject = true;

        if (PrevFingerBone != null)
        {
            PrevFingerBone.TouchObject(obj);
        }
    }
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.GetComponent <Rigidbody>() != null)
     {
         if (!col.gameObject.GetComponent <Rigidbody>().isKinematic)
         {
             ThisHandPart.TouchObject(col.gameObject);
             ThisHandPart.CollidedObjects.Add(col.gameObject);
         }
     }
 }
Exemplo n.º 3
0
    void OnTriggerEnter(Collider col)
    {
        if (col.gameObject.GetComponent <Rigidbody>() != null)
        {
            if (!col.gameObject.GetComponent <Rigidbody>().isKinematic)
            {
                ThisHandPart.TouchObject(col.gameObject);
                ThisHandPart.CollidedObjects.Add(col.gameObject);

                if (!handPhysicsController.collision)
                {
                    handPhysicsController.collision = true;
                    handPhysicsController.vibrate();
                }
            }
        }
    }