public virtual void InteractingUpdate(VRIHand hand) { if (hand.UseButtonUp == true) { UseButtonUp(); } }
public override void BeginInteraction(VRIHand hand) { base.BeginInteraction(hand); Vector3 closestPoint = Vector3.zero; float shortestDistance = float.MaxValue; for (int index = 0; index < Colliders.Length; index++) { Vector3 closest = Colliders[index].bounds.ClosestPoint(AttachedHand.transform.position); float distance = Vector3.Distance(AttachedHand.transform.position, closest); if (distance < shortestDistance) { shortestDistance = distance; closestPoint = closest; } } PickupTransform = new GameObject("PickupTransform: " + this.gameObject.name).transform; PickupTransform.parent = hand.transform; PickupTransform.position = this.transform.position; PickupTransform.rotation = this.transform.rotation; }
public virtual void EndInteraction() { AttachedHand = null; }
public virtual void BeginInteraction(VRIHand hand) { AttachedHand = hand; }