public override void OnManipulationStarted(VRInteraction caller) { base.OnManipulationStarted(caller); rby.useGravity = false; rby.isKinematic = true; currSelectingCtrl = null; }
public override void OnTriggerPress(VRInteraction caller, VRWand_Controller wand) { if (!isBeingHeld && caller.CanManipulate(this)) { GetPicked(caller); } }
public override void OnGripPress(VRInteraction caller, VRWand_Controller wand) { if (holder == caller) { GetDropped(wand.throwVelocity); } }
public override void OnTriggerRelease(VRInteraction caller, VRWand_Controller wand) { if (!releaseWithGripOnly && holder == caller) { GetDropped(wand.throwVelocity); } }
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); } }
protected override void GetPicked(VRInteraction interaction) { interaction.SetManipulatedInteractable(this); SetPositionAndRotation(); rby.useGravity = false; rby.isKinematic = true; }
public override void OnDeselected(VRInteraction caller) { base.OnDeselected(caller); HandController hand = caller as HandController; if (hand != null) { hand.RecoverBaseAnimator(); } }
public override void OnSelected(VRInteraction caller) { base.OnSelected(caller); HandController hand = caller as HandController; if (hand != null) { SetAnimOverride(hand.animHand); } }
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; } }
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); } }
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; } }
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; }
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; }
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); }
public override void OnManipulationEnded(VRInteraction caller) { base.OnManipulationEnded(caller); //Verificar se está na barra: Cair se sim, voltar à posição inicial se não }
public abstract void OnGripRelease(VRInteraction caller, VRWand_Controller wand);
private void Awake() { vrInteraction = transform.GetActiveComponentInChildren <VRInteraction>(); trackedObj = GetComponent <SteamVR_TrackedObject>(); isLeftHand = trackedObj.transform.name.ToLower().Contains("left"); }
public virtual void OnManipulationEnded(VRInteraction caller) { isManipulated = false; }
public abstract void OnGripPress(VRInteraction caller, VRWand_Controller wand);
public virtual void OnDeselected(VRInteraction caller) { isSelected = false; }
public virtual void OnManipulationStarted(VRInteraction caller) { isManipulated = true; }
public override void OnGripRelease(VRInteraction caller, VRWand_Controller wand) { }
public virtual void OnSelected(VRInteraction caller) { isSelected = true; }
protected virtual void Start() { vrInteraction = GetComponent <VRInteraction>(); vrInteraction.onInteract += OnInteract; }
public override void OnManipulationStarted(VRInteraction caller) { }
public override void OnSelected(VRInteraction caller) { }
protected abstract void GetPicked(VRInteraction interaction);
public override void OnTriggerPress(VRInteraction caller, VRWand_Controller wand) { }