private void DoTriggerReleased(object sender, ControllerInteractionEventArgs e) { tooltips.ToggleTips(false, VRTK_ControllerTooltips.TooltipButtons.TriggerTooltip); actions.ToggleHighlightTrigger(false); if (!events.AnyButtonPressed()) { actions.SetControllerOpacity(1f); } }
private void DoMenuOn(object sender, ControllerInteractionEventArgs e) { if (!menuInit) { InitMenu(); } clonedMenuObject.SetActive(true); menuActive = true; }
private void DoTouchpadReleased(object sender, ControllerInteractionEventArgs e) { if (roomExtender.additionalMovementEnabledOnButtonPress) { DisableAdditionalMovement(); } else { EnableAdditionalMovement(); } }
private void DoTouchpadPressed(object sender, ControllerInteractionEventArgs e) { roomExtender.additionalMovementMultiplier = e.touchpadAxis.magnitude * 5 > 1 ? e.touchpadAxis.magnitude * 5 : 1; if (roomExtender.additionalMovementEnabledOnButtonPress) { EnableAdditionalMovement(); } else { DisableAdditionalMovement(); } }
private void DoApplicationMenuPressed(object sender, ControllerInteractionEventArgs e) { switch (roomExtender.movementFunction) { case VRTK_RoomExtender.MovementFunction.Nonlinear: roomExtender.movementFunction = VRTK_RoomExtender.MovementFunction.LinearDirect; break; case VRTK_RoomExtender.MovementFunction.LinearDirect: roomExtender.movementFunction = VRTK_RoomExtender.MovementFunction.Nonlinear; break; default: break; } }
private void DoTriggerPressed(object sender, ControllerInteractionEventArgs e) { tooltips.ToggleTips(true, VRTK_ControllerTooltips.TooltipButtons.TriggerTooltip); actions.ToggleHighlightTrigger(true, Color.yellow, 0.5f); actions.SetControllerOpacity(0.8f); }
private void DebugLogger(uint index, string button, string action, ControllerInteractionEventArgs e) { Debug.Log("Controller on index '" + index + "' " + button + " has been " + action + " with a pressure of " + e.buttonPressure + " / trackpad axis at: " + e.touchpadAxis + " (" + e.touchpadAngle + " degrees)"); }
private void DoTouchpadPressed(object sender, ControllerInteractionEventArgs e) { DebugLogger(e.controllerIndex, "TOUCHPAD", "pressed down", e); }
private void DoControllerEnabled(object sender, ControllerInteractionEventArgs e) { DebugLogger(e.controllerIndex, "CONTROLLER STATE", "ENABLED", e); }
private void DoTriggerReleased(object sender, ControllerInteractionEventArgs e) { rcCarScript.SetTriggerAxis(0f); }
private void DoMenuOff(object sender, ControllerInteractionEventArgs e) { clonedMenuObject.SetActive(false); menuActive = false; }
private void DoGrabOff(object sender, ControllerInteractionEventArgs e) { targetGripRotation = originalGripRotation; }
private void DoClicked(object sender, ControllerInteractionEventArgs e) { menu.SetActive(!menu.activeSelf); }
private void DoRightPinkyFingerSenseAxisChanged(object sender, ControllerInteractionEventArgs e) { }
private void DoRightControllerIndexChanged(object sender, ControllerInteractionEventArgs e) { }
private void DoGripTouchStart(object sender, ControllerInteractionEventArgs e) { Debug.LogWarning("Colorhistory opened"); _gripTouched = true; }
public void LeftGrab(object sender, ControllerInteractionEventArgs e) { LeftPulse(); }
void ControllerTrigger_TriggerUnclicked(object sender, ControllerInteractionEventArgs e) { pressingTrigger = false; }
private void DoUseOff(object sender, ControllerInteractionEventArgs e) { targetPointerRotation = originalPointerRotation; }
private void MenuAndInstructions_ButtonTwoReleased(object sender, ControllerInteractionEventArgs e) { Debug.Log("Emitted"); onOffSwitch = true; }
private void DoApplicationMenuPressed(object sender, ControllerInteractionEventArgs e) { rcCarScript.ResetCar(); }
/// <summary> /// when users click the grip button, call the copyArc function attached to system monitor to generate the minimap with the arc /// </summary> /// <param name="sender">VRTK predefined variable, not used in this project</param> /// <param name="e">VRTK predefined variable, not used in this project</param> private void ControllerEvent_GripClicked(object sender, ControllerInteractionEventArgs e) { GlobalMonitor.copyArc(controller.transform.position); }
private void DoTouchpadTouchEnd(object sender, ControllerInteractionEventArgs e) { remoteBeamScript.SetTouchAxis(Vector2.zero); }
/// <summary> /// This function is called when users release the grab button, it will destroy the target object if the speed of the controller /// is high enough /// </summary> /// <param name="sender">VRTK predefined variable, not used in this project</param> /// <param name="e">VRTK predefined variable, not used in this project</param> private void Interact_GrabButtonReleased(object sender, ControllerInteractionEventArgs e) { if (targetLabel == "O_State" || targetLabel == "D_State" || targetLabel == "Arc") // deletion only applied to origin state pop-up, destination state pop-up, or miniArc pop-up { controllerSpeed = VRTK_DeviceFinder.GetControllerVelocity(controllerReference) * impactMagnifier; speedMagnitude = controllerSpeed.magnitude; // get the speed of the controller rigi = theTarget.GetComponent <Rigidbody>(); //Debug.Log(speedMagnitude); if (speedMagnitude > 80) { // if large enough rigi.isKinematic = false; rigi.useGravity = true; rigi.AddForce(controllerSpeed); // change the state so the object maintain the gravity and speed after being released Destroy(theTarget, 2); if (targetLabel == "O_State") { // if the origin state is deleted instructionScript.changeText(0); // change the descriptions of the instruction // clear OD links attached to Origin node, and turn off nodes on country map GlobalMonitor.hideArcs(GlobalMonitor.o_node); GlobalMonitor.o_node.GetComponent <MeshRenderer>().enabled = false; GlobalMonitor.origin = null; GlobalMonitor.o_node = null; // clear the global variables in Monitor if (GlobalMonitor.d_node != null) { // delete the destination node if it exists GlobalMonitor.d_node.GetComponent <MeshRenderer>().enabled = false; GlobalMonitor.d_node = null; } if (GlobalMonitor.destination != null) { // throw away and delete the destination state if it exists rigi = GlobalMonitor.destination.GetComponent <Rigidbody>(); rigi.isKinematic = false; rigi.useGravity = true; Destroy(GlobalMonitor.destination, 2); GlobalMonitor.destination = null; } GlobalMonitor.origin_text = null; GlobalMonitor.destination_text = null; // clear the textboxes attached to the origin and destination nodes } else if (targetLabel == "D_State") { // if the destination state is deleted // change the descriptions of the instruction instructionScript.changeText(2); Transform o = GlobalMonitor.o_node.transform; if (GlobalMonitor.d_node != null) { // delete the destination node if it exists GlobalMonitor.d_node.GetComponent <MeshRenderer>().enabled = false; GlobalMonitor.d_node = null; } GlobalMonitor.destination = null; foreach (Transform bezierContainer in o) { // turn on all arcs from the origin node bezierContainer.GetComponent <bezier>().turnOn(); } GlobalMonitor.destination_text = null; // clear the textbox attched to the destination node // turn on all bezier curves on origin node, and all destination nodes on country map } else if (targetLabel == "Arc") { // if the minimap is deleted GlobalMonitor.clearArc(); } Transform US = GameObject.Find("/America").transform; if (targetLabel == "O_State" || targetLabel == "D_State") { foreach (Transform eachState in US) { // make states on the country map interactable again eachState.GetComponent <StateInteraction>().interactable = true; } } } } }
private void DoGripReleased(object sender, ControllerInteractionEventArgs e) { DebugLogger(e.controllerIndex, "GRIP", "released", e); }
protected virtual void DoTouchpadPress(object sender, ControllerInteractionEventArgs e) { if (isGrabbed) { //Use it if you want a speculare touchpad press position// //var pressPosition = CalculateTouchpadPressPosition(); currentPanelId = 0; if (descPanel.activeSelf == true) { statutDesc = false; } else { statutDesc = true; } if (statutDesc == true) { for (int i = 1; i < allPanelMenuItemController.Count; i++) { if (allPanelMenuItemController[i].gameObject.activeSelf == true) { allPanelMenuItemController[i].gameObject.SetActive(false); } } for (int i = 0; i < presentationPanel.transform.childCount; i++) { if (presentationPanel.transform.GetChild(i).gameObject.activeSelf == true) { presentationPanel.transform.GetChild(i).gameObject.SetActive(false); } } descPanel.SetActive(true); currentPanelMenuItemController = allPanelMenuItemController[0]; currentPanelMenuItemController.gameObject.SetActive(true); } else { currentPanelMenuItemController.gameObject.SetActive(false); for (int i = 0; i < allPanelMenuItemController.Count; i++) { if (allPanelMenuItemController[i].gameObject.activeSelf == true) { allPanelMenuItemController[i].gameObject.SetActive(false); } } for (int i = 1; i < presentationPanel.transform.childCount; i++) { if (presentationPanel.transform.GetChild(i).gameObject.activeSelf == true) { presentationPanel.transform.GetChild(i).gameObject.SetActive(false); } } presentationPanel.transform.GetChild(0).gameObject.SetActive(true); } /* switch (pressPosition) * { * case TouchpadPressPosition.Top: * UpBtnPushed(); * break; * * case TouchpadPressPosition.Bottom: * DownBtnPushed(); * break; * * case TouchpadPressPosition.Left: * * break; * * case TouchpadPressPosition.Right: * * break; * }*/ } }
private void DoTouchpadTouchStart(object sender, ControllerInteractionEventArgs e) { DebugLogger(e.controllerIndex, "TOUCHPAD", "touched", e); }
protected virtual void DoTouchpadTouched(object sender, ControllerInteractionEventArgs e) { touchStartPosition = new Vector2(e.touchpadAxis.x, e.touchpadAxis.y); touchStartTime = Time.time; isTrackingSwipe = true; }
private void DoTriggerReleased(object sender, ControllerInteractionEventArgs e) { DebugLogger(e.controllerIndex, "TRIGGER", "released", e); }
protected virtual void DoTouchpadUntouched(object sender, ControllerInteractionEventArgs e) { isTrackingSwipe = false; isPendingSwipeCheck = true; }
protected virtual void DoTouchpadPressed(object sender, ControllerInteractionEventArgs e) { Debug.Log("Touchpad pressed" + e.touchpadAxis); }
protected virtual float CalculateAngle(ControllerInteractionEventArgs e) { return(e.touchpadAngle); }
private void DoGripTouchEnd(object sender, ControllerInteractionEventArgs e) { Debug.LogWarning("Colorhistory closed"); _gripTouched = false; }
private void LeftControllerDoTriggerClicked(object sender, ControllerInteractionEventArgs e) { leftControllerClicked = true; }
public void RightGrab(object sender, ControllerInteractionEventArgs e) { RightPulse(); }
private void RightControllerDoTriggerUnclicked(object sender, ControllerInteractionEventArgs e) { rightControllerClicked = false; }
private void DoGrabOn(object sender, ControllerInteractionEventArgs e) { targetGripRotation = maxRotation; }
protected virtual void ToggleHands(object sender, ControllerInteractionEventArgs e) { state = !state; ToggleVisibility(); }
private void DoUseOn(object sender, ControllerInteractionEventArgs e) { targetPointerRotation = maxRotation; }
private void DoTouchpadAxisChanged(object sender, ControllerInteractionEventArgs e) { Debug.Log(e); }
// Token: 0x06001E04 RID: 7684 RVA: 0x000988F9 File Offset: 0x00096AF9 private void DoTriggerPressed(object sender, ControllerInteractionEventArgs e) { base.Invoke("CreateSphere", 0f); }
void OnMenu(object sender, ControllerInteractionEventArgs e) => modeCtl.EndMenu();
private void DoTriggerAxisChanged(object sender, ControllerInteractionEventArgs e) { rcCarScript.SetTriggerAxis(e.buttonPressure); }
public virtual void DoTouchPadPressed(object sender, ControllerInteractionEventArgs e) { }
private void DoTouchpadAxisChanged(object sender, ControllerInteractionEventArgs e) { remoteBeamScript.SetTouchAxis(e.touchpadAxis); }
public virtual void DoApplicationMenuPressed(object sender, ControllerInteractionEventArgs e) { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); }
private void DoApplicationMenuReleased(object sender, ControllerInteractionEventArgs e) { DebugLogger(e.controllerIndex, "APPLICATION MENU", "released", e); }
public virtual void DoApplicationMenuReleased(object sender, ControllerInteractionEventArgs e) { }
private void DoGripPressed(object sender, ControllerInteractionEventArgs e) { DebugLogger(e.controllerIndex, "GRIP", "pressed down", e); }
public virtual void DoGripReleased(object sender, ControllerInteractionEventArgs e) { }
private void DoTouchpadAxisChanged(object sender, ControllerInteractionEventArgs e) { DebugLogger(e.controllerIndex, "TOUCHPAD", "axis changed", e); }
public void HandleTouchpadTouchStart(object sender, ControllerInteractionEventArgs e) { swipeStart = new Vector2(e.touchpadAxis.x, e.touchpadAxis.y); swipeStartTime = Time.time; }
private void DoTouchpadReleased(object sender, ControllerInteractionEventArgs e) { DebugLogger(e.controllerIndex, "TOUCHPAD", "released", e); }
public void HandleTouchpadAxisChanged(object sender, ControllerInteractionEventArgs e) { swipeEnd = new Vector2(e.touchpadAxis.x, e.touchpadAxis.y); }
private void DoTriggerAxisChanged(object sender, ControllerInteractionEventArgs e) { DebugLogger(e.controllerIndex, "TRIGGER", "axis changed", e); }
private void ControllerEvents_ButtonTwoReleased(object sender, ControllerInteractionEventArgs e) { menuState = !menuState; menu.SetActive(menuState); menu2.SetActive(false); }
private void DoTriggerHairlineStart(object sender, ControllerInteractionEventArgs e) { DebugLogger(e.controllerIndex, "TRIGGER", "hairline start", e); }
private void DoButtonTwoPressed(object sender, ControllerInteractionEventArgs e) { teleport = !teleport; }
private void DoTriggerTouchEnd(object sender, ControllerInteractionEventArgs e) { DebugLogger(e.controllerIndex, "TRIGGER", "untouched", e); }
private void DoApplicationMenuPressed(object sender, ControllerInteractionEventArgs e) { tooltips.ToggleTips(true, VRTK_ControllerTooltips.TooltipButtons.AppMenuTooltip); actions.ToggleHighlightApplicationMenu(true, Color.yellow, 0.5f); actions.SetControllerOpacity(0.8f); }