Esempio n. 1
0
 /// <summary>
 /// Rotate transform based on input value from InputBridge
 /// </summary>
 private void ProcessRotation()
 {
     currentRotation +=
         inputBridge.LookAxis().x *
         Time.deltaTime * 10;
     transformToRotate.localRotation =
         Quaternion.Euler(Vector3.up * currentRotation);
 }
Esempio n. 2
0
 /// <summary>
 /// Rotate transform based on input value from InputBridge
 /// </summary>
 private void ProcessRotation()
 {
     if (invert)
     {
         currentRotation +=
             inputBridge.LookAxis().y *
             Time.deltaTime * 10;
     }
     else
     {
         currentRotation -=
             inputBridge.LookAxis().y *
             Time.deltaTime * 10;
     }
     currentRotation =
         Mathf.Clamp(currentRotation, -upperLimit, lowerLimit);
     transformToRotate.localRotation =
         Quaternion.Euler(Vector3.right * currentRotation);
 }