private void Awake() { if (GetComponent <SteamVR_InteractTouch>() == null) { Debug.LogError("SteamVR_InteractGrab is required to be attached to a SteamVR Controller that has the SteamVR_InteractTouch script attached to it"); return; } interactTouch = GetComponent <SteamVR_InteractTouch>(); trackedController = GetComponent <SteamVR_TrackedObject>(); controllerActions = GetComponent <SteamVR_ControllerActions>(); }
private void Awake() { if (GetComponent<SteamVR_InteractTouch>() == null) { Debug.LogError("SteamVR_InteractUse is required to be attached to a SteamVR Controller that has the SteamVR_InteractTouch script attached to it"); return; } interactTouch = GetComponent<SteamVR_InteractTouch>(); trackedController = GetComponent<SteamVR_TrackedObject>(); controllerActions = GetComponent<SteamVR_ControllerActions>(); }
private void DoObjectGrab(object sender, InteractableObjectEventArgs e) { if (e.interactingObject == controllers.left) { holdControl = controllers.left.GetComponent <SteamVR_ControllerEvents>(); stringControl = controllers.right.GetComponent <SteamVR_ControllerEvents>(); holdActions = controllers.left.GetComponent <SteamVR_ControllerActions>(); stringActions = controllers.right.GetComponent <SteamVR_ControllerActions>(); } else { stringControl = controllers.left.GetComponent <SteamVR_ControllerEvents>(); holdControl = controllers.right.GetComponent <SteamVR_ControllerEvents>(); stringActions = controllers.left.GetComponent <SteamVR_ControllerActions>(); holdActions = controllers.right.GetComponent <SteamVR_ControllerActions>(); } StartCoroutine("GetBaseRotation"); }
public override void Grabbed(GameObject grabbingObject) { base.Grabbed(grabbingObject); controllerActions = grabbingObject.GetComponent <SteamVR_ControllerActions>(); }
private void Awake() { trackedController = GetComponent<SteamVR_TrackedObject>(); controllerActions = GetComponent<SteamVR_ControllerActions>(); }
private void Awake() { trackedController = GetComponent <SteamVR_TrackedObject>(); controllerActions = GetComponent <SteamVR_ControllerActions>(); }
public override void Grabbed(GameObject grabbingObject) { base.Grabbed(grabbingObject); controllerActions = grabbingObject.GetComponent<SteamVR_ControllerActions>(); }