private void OnEnable() { hand = HandUIManager.GetHand(whichHand); pinch = HandUIManager.GetPinchGesture(whichHand); self = GetComponent <UIEntity>(); hrt = keyboardPlane.GetComponent <HandRaycastTarget>(); pinch.OnOpen += OnPinch; self.Hide(0, 0.05f); }
private void Start() { head = HandUIManager.head; hand = HandUIManager.GetHand(whichHand); pg = HandUIManager.GetPinchGesture(whichHand); // AirTap init, getting index and wrist postions fPos = hand.leapHand.GetIndex().TipPosition.ToVector3(); fPrevPos = fPos; wPos = hand.leapHand.WristPosition.ToVector3(); wPrevPos = wPos; }
// Use this for initialization void Start() { line = GetComponentInChildren <LineProjector>(); lineColor = line.transform.GetComponent <UIColor>(); pg = HandUIManager.GetPinchGesture(whichHand); hand = whichHand == Chirality.Left ? HandUIManager.handLeft : HandUIManager.handRight; projector = GetComponentInChildren <Projector>(); projectorColor = projector.transform.GetComponent <UIColor>(); initSphereParentScale = sphere.parent.localScale; CalculateBounds(); HideSphere(); }
public static Transform stablePinchTransform(this InteractionHand hand) { return(HandUIManager.GetPinchGesture(hand.chirality()).stablePinch); }
public static Vector3 stablePinchPos(this InteractionHand hand) { return(HandUIManager.GetPinchGesture(hand.chirality()).stablePinch.position); }
public static bool isPinched(this InteractionHand hand) { return(HandUIManager.GetPinchGesture(hand.chirality()).isActive&& hand.isTracked); }