Ejemplo n.º 1
0
 public override void OnManipulationStarted(VRInteraction caller)
 {
     base.OnManipulationStarted(caller);
     rby.useGravity    = false;
     rby.isKinematic   = true;
     currSelectingCtrl = null;
 }
Ejemplo n.º 2
0
 public override void OnTriggerPress(VRInteraction caller, VRWand_Controller wand)
 {
     if (!isBeingHeld && caller.CanManipulate(this))
     {
         GetPicked(caller);
     }
 }
Ejemplo n.º 3
0
 public override void OnGripPress(VRInteraction caller, VRWand_Controller wand)
 {
     if (holder == caller)
     {
         GetDropped(wand.throwVelocity);
     }
 }
Ejemplo n.º 4
0
 public override void OnTriggerRelease(VRInteraction caller, VRWand_Controller wand)
 {
     if (!releaseWithGripOnly && holder == caller)
     {
         GetDropped(wand.throwVelocity);
     }
 }
Ejemplo n.º 5
0
 public override bool IsCompatibleWithAction(VRInteraction.InteractionEvent action)
 {
     if (VRInteraction.ActionToType(action) == VRInteraction.InteractionType.Trigger)
     {
         return(true);
     }
     return(false);
 }
 public void RequestAssignClientAuthority(GameObject iObject, VRInteraction interaction)
 {
     if (iObject != null && isLocalPlayer)
     {
         m_AssignClientAuthorityRequests.Add(iObject, interaction);
         CmdAssignClientAuthority(iObject);
     }
 }
Ejemplo n.º 7
0
    protected override void GetPicked(VRInteraction interaction)
    {
        interaction.SetManipulatedInteractable(this);

        SetPositionAndRotation();

        rby.useGravity  = false;
        rby.isKinematic = true;
    }
Ejemplo n.º 8
0
    public override void OnDeselected(VRInteraction caller)
    {
        base.OnDeselected(caller);
        HandController hand = caller as HandController;

        if (hand != null)
        {
            hand.RecoverBaseAnimator();
        }
    }
Ejemplo n.º 9
0
    public override void OnSelected(VRInteraction caller)
    {
        base.OnSelected(caller);
        HandController hand = caller as HandController;

        if (hand != null)
        {
            SetAnimOverride(hand.animHand);
        }
    }
Ejemplo n.º 10
0
    public override void OnSelected(VRInteraction caller)
    {
        base.OnSelected(caller);
        HandController_Ray rayCtrl = caller as HandController_Ray;

        if (rayCtrl != null)
        {
            referencePos = tRoot.position;
            rayCtrl.SetRenderLine(false);
            currSelectingCtrl = rayCtrl;
        }
    }
Ejemplo n.º 11
0
    public override void OnManipulationStarted(VRInteraction caller)
    {
        base.OnManipulationStarted(caller);
        HandController hand = caller as HandController;

        if (hand != null)
        {
            holder       = hand;
            tRoot.parent = holder.modelGrabPoint;
            hand.SetGrabAnimParams(this);
        }
    }
Ejemplo n.º 12
0
    public override void OnDeselected(VRInteraction caller)
    {
        base.OnDeselected(caller);
        HandController_Ray rayCtrl = caller as HandController_Ray;

        if (rayCtrl != null)
        {
            rayCtrl.SetRenderLine(true);
            currSelectingCtrl = null;

            rby.useGravity  = true;
            rby.isKinematic = false;
        }
    }
Ejemplo n.º 13
0
    public override void OnManipulationEnded(VRInteraction caller)
    {
        base.OnManipulationEnded(caller);
        HandController hand = caller as HandController;

        if (hand != null)
        {
            hand.animHand.SetBool("Grab", false);
        }

        holder = null;

        tRoot.parent = null;
    }
Ejemplo n.º 14
0
    public override void OnManipulationEnded(VRInteraction caller)
    {
        base.OnManipulationEnded(caller);
        HandController hand = caller as HandController;

        if (hand != null)
        {
            hand.SetReleaseAnimParams(this);
        }

        holder = null;

        tRoot.parent = null;
    }
Ejemplo n.º 15
0
    public override void OnManipulationStarted(VRInteraction caller)
    {
        base.OnManipulationStarted(caller);
        HandController hand = caller as HandController;

        if (hand != null)
        {
            hand.animHand.SetBool("Grab", true);
            hand.animHand.SetFloat("Squeeze", squeeze);
        }

        holder = hand;

        tRoot.parent = holder.modelGrabPoint;
    }
    public bool SetVRInteraction(VRInteraction interaction)
    {
        if (interaction != null)
        {
            if (vrInteraction != null)
            {
                vrInteraction.enabled = false;
            }
            vrInteraction         = interaction;
            vrInteraction.enabled = true;

            return(true);
        }

        return(false);
    }
Ejemplo n.º 17
0
 public override void OnManipulationEnded(VRInteraction caller)
 {
     base.OnManipulationEnded(caller);
     //Verificar se está na barra: Cair se sim, voltar à posição inicial se não
 }
Ejemplo n.º 18
0
 public abstract void OnGripRelease(VRInteraction caller, VRWand_Controller wand);
Ejemplo n.º 19
0
 private void Awake()
 {
     vrInteraction = transform.GetActiveComponentInChildren <VRInteraction>();
     trackedObj    = GetComponent <SteamVR_TrackedObject>();
     isLeftHand    = trackedObj.transform.name.ToLower().Contains("left");
 }
Ejemplo n.º 20
0
 public virtual void OnManipulationEnded(VRInteraction caller)
 {
     isManipulated = false;
 }
Ejemplo n.º 21
0
 public abstract void OnGripPress(VRInteraction caller, VRWand_Controller wand);
Ejemplo n.º 22
0
 public virtual void OnDeselected(VRInteraction caller)
 {
     isSelected = false;
 }
Ejemplo n.º 23
0
 public virtual void OnManipulationStarted(VRInteraction caller)
 {
     isManipulated = true;
 }
Ejemplo n.º 24
0
 public override void OnGripRelease(VRInteraction caller, VRWand_Controller wand)
 {
 }
Ejemplo n.º 25
0
 public virtual void OnSelected(VRInteraction caller)
 {
     isSelected = true;
 }
Ejemplo n.º 26
0
 protected virtual void Start()
 {
     vrInteraction             = GetComponent <VRInteraction>();
     vrInteraction.onInteract += OnInteract;
 }
Ejemplo n.º 27
0
 public override void OnManipulationStarted(VRInteraction caller)
 {
 }
Ejemplo n.º 28
0
 public override void OnSelected(VRInteraction caller)
 {
 }
Ejemplo n.º 29
0
 protected abstract void GetPicked(VRInteraction interaction);
Ejemplo n.º 30
0
 public override void OnTriggerPress(VRInteraction caller, VRWand_Controller wand)
 {
 }