Exemple #1
0
 /// <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);
     }
 }
Exemple #2
0
 /// <summary>
 /// Get Trigger Down Event
 /// </summary>
 /// <param name="hand">Controller ID</param>
 void ReceiveTriggerUpEvent(InputManager.ControllerHand hand)
 {
     PrintText("Speed: " + InputManager.GetControllerTransform(hand).Velocity);
 }
Exemple #3
0
 /// <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");
 }