/// <summary> /// Moves the cube based on the InputManager's Trackpad value /// </summary> /// <param name="hand">Controller ID.</param> /// <param name="value">Trackpad value</param> void MoveCube(InputManager.ControllerHand hand, Vector2 value) { if (hand == InputManager.ControllerHand.Left) { transform.position += Vector3.up * value.y * Time.deltaTime; } else if (hand == InputManager.ControllerHand.Right) { transform.position += new Vector3(value.x, 0, value.y); } }
/// <summary> /// Get Trigger Down Event /// </summary> /// <param name="hand">Controller ID</param> void ReceiveTriggerUpEvent(InputManager.ControllerHand hand) { PrintText("Speed: " + InputManager.GetControllerTransform(hand).Velocity); }
/// <summary> /// Get Trigger Down Event /// </summary> /// <param name="hand">Controller ID</param> void ReceiveTriggerDownEvent(InputManager.ControllerHand hand) { PrintText("Trigger is down on " + System.Enum.GetName(typeof(InputManager.ControllerHand), hand) + " hand"); }