Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    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;
    }
Esempio n. 3
0
    // 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();
    }
Esempio n. 4
0
 public static Transform stablePinchTransform(this InteractionHand hand)
 {
     return(HandUIManager.GetPinchGesture(hand.chirality()).stablePinch);
 }
Esempio n. 5
0
 public static Vector3 stablePinchPos(this InteractionHand hand)
 {
     return(HandUIManager.GetPinchGesture(hand.chirality()).stablePinch.position);
 }
Esempio n. 6
0
 public static bool isPinched(this InteractionHand hand)
 {
     return(HandUIManager.GetPinchGesture(hand.chirality()).isActive&& hand.isTracked);
 }