Learning C# through Experimental Rig-Building in Unity
Excerpt from a Position Constraint/Carry Script 2020
if (Finger3.bounds.Intersects (ThisInteractable.bounds) && Finger1.bounds.Intersects (ThisInteractable.bounds) && Finger2.bounds.Intersects (ThisInteractable.bounds)){
Debug.Log ("Inrangetopickup");
inrange = true;}
Debug.Log ("Inrangetopickup");
inrange = true;}
if (inrange == true && Input.GetMouseButtonDown(0) && Finger3.bounds.Intersects (ThisInteractable.bounds) && Finger1.bounds.Intersects (ThisInteractable.bounds) && Finger2.bounds.Intersects (ThisInteractable.bounds)){
PosConstraint.constraintActive = true;
PosConstraint.constraintActive = true;
//RotCon.constraintActive = true;
thisobj.GetComponent<Rigidbody> ().isKinematic = true;}
if(PosConstraint.constraintActive == true){
carrying = true;}
}