private void OnHoverExit(XRBaseInteractor interactor)
 {
     if (isScalling)
     {
         return;
     }
     if (interactor.Equals(interactorA))
     {
         interactorA = null;
     }
     if (interactor.Equals(interactorB))
     {
         interactorB = null;
     }
 }
    //réécrire IsSelectableBy donc avec la 1ere main
    public override bool IsSelectableBy(XRBaseInteractor interactor)
    {
        //est-ce qu'il y a une main principale ET que la manette qui interagit n'est pas la manette principale
        bool isGrabbed = selectingInteractor && !interactor.Equals(selectingInteractor);

        return(base.IsSelectableBy(interactor) && !isGrabbed);
    }
Exemple #3
0
    ////첫번째로 집을때 selectingInteractor는 널값
    ////interactor는 컨트롤러값
    ////반환 실행

    ////두번째로 집을때 selectingInteractor는 레이값
    ////interactor는 컨트롤러값 반환 실행x => 상호작용 하지않는다 => secondHandGrabPoints함수쪽 실행
    public override bool IsSelectableBy(XRBaseInteractor interactor)
    {
        if (isInHolster)
        {
            return(base.IsSelectableBy(interactor));
        }
        else
        {
            bool isalreadygrabbed = selectingInteractor && !interactor.Equals(selectingInteractor);
            return(base.IsSelectableBy(interactor) && !isalreadygrabbed);
        }
    }
Exemple #4
0
    public void ClearGripHand(XRBaseInteractor interactor)
    {
        if (selectingInteractor.Equals(interactor))
        {
            selectingInteractor.attachTransform.rotation = attachTransformRot;
            OnSelectExit(interactor);

            if (secondInteractor)
            {
                SetGripHand(secondInteractor, secondInteractableAttachTransform, secondInteractableRotationOffset);
                secondInteractor = null;
            }
            else if (retainOrigin)
            {
                this.transform.localPosition = oldPos;
                this.transform.localRotation = oldRot;
            }
        }
        else if (interactor.Equals(secondInteractor))
        {
            secondInteractor = null;
        }
    }
 public override bool IsSelectableBy(XRBaseInteractor interactor)
 {
     bool isAlreadyGrabbed = selectingInteractor && !interactor.Equals(selectingInteractor);
     return base.IsSelectableBy(interactor) && !isAlreadyGrabbed;
 }