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); } } }
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(); } } } }