Beispiel #1
0
 public virtual void LetGoObject()
 {
     if (GrabbedObject == null)
     {
         return;
     }
     GrabbedObject.LetGo(GrabberVelocity * maxVelocity, this);
     GrabbedObject = null;
 }
Beispiel #2
0
 public virtual void GrabObject()
 {
     if (ColliderBehaviourRef.HighLightedObject == null)
     {
         return;
     }
     GrabbedObject   = ColliderBehaviourRef.HighLightedObject;
     GrabbedLocation = ColliderBehaviourRef.HitLocation;
     GrabbedObject.Grabbed(this);
 }
 private void OnTriggerExit(Collider other)
 {
     HighLightedObject?.HighLight(false);
     HighLightedObject = null;
 }
 private void OnTriggerEnter(Collider other)
 {
     HitLocation       = other.transform.position;
     HighLightedObject = other.GetComponent <GrabbableBehaviour>();
     HighLightedObject?.HighLight(true);
 }