private void OnDetachedFromHand(Hand hand) { _grabbingObject = null; ControllerInteraction.ControllerHand handContext = hand.handType.GetHand(); InteractableObjectUngrabbed?.Invoke(this, new ObjectInteraction.InteractableObjectEventArgs { interactingObject = gameObject, Hand = handContext }); }
private void OnAttachedToHand(Hand hand) { _grabbingObject = hand; ControllerInteraction.ControllerHand handContext = hand.handType.GetHand(); InteractableObjectGrabbed?.Invoke(this, new ObjectInteraction.InteractableObjectEventArgs { interactingObject = gameObject, Hand = handContext }); Debug.Log("attached to " + hand.handType); }
public virtual ControllerNode GetControllerReference(ControllerInteraction.ControllerHand hand) { switch (hand) { case ControllerInteraction.ControllerHand.Left: return(LeftHand); case ControllerInteraction.ControllerHand.Right: return(RightHand); } return(null); }
private void UseStop(SteamVR_Behaviour_Boolean triggerInput, SteamVR_Input_Sources sources, bool state) { if (!_isUsing) { return; } Debug.Log("Use unpressed"); _isUsing = false; ControllerInteraction.ControllerHand handContext = triggerInput.booleanAction.activeDevice.GetHand(); InteractableObjectUnused?.Invoke(this, new ObjectInteraction.InteractableObjectEventArgs { interactingObject = gameObject, Hand = handContext }); }
private void Use(SteamVR_Behaviour_Boolean triggerInput, SteamVR_Input_Sources sources, bool state) { if (!ValidInput(triggerInput)) { return; } Debug.Log("Use pressed on " + gameObject.name); if (!IsUsable) { return; } _isUsing = true; ControllerInteraction.ControllerHand handContext = triggerInput.booleanAction.activeDevice.GetHand(); InteractableObjectUsed?.Invoke(this, new ObjectInteraction.InteractableObjectEventArgs { interactingObject = gameObject, Hand = handContext }); Debug.Log("Used " + gameObject.name); }
public override string GetControllerElementPath( ControllerInteraction.ControllerElements findElement, ControllerInteraction.ControllerHand controllerHand, bool b) => throw new NotImplementedException();
public abstract string GetControllerElementPath( ControllerInteraction.ControllerElements findElement, ControllerInteraction.ControllerHand controllerHand, bool b);