Ejemplo n.º 1
0
 protected virtual void Update()
 {
     if (controllerEvents != null && controllerEvents.GetAxisState(coordinateAxis, SDK_BaseController.ButtonPressTypes.Touch) && !InsideDeadzone(controllerEvents.GetAxis(coordinateAxis)))
     {
         float touchpadAngle = controllerEvents.GetAxisAngle(coordinateAxis);
         float angle         = ((touchpadAngle > 180) ? touchpadAngle -= 360 : touchpadAngle) + headset.eulerAngles.y;
         transform.localEulerAngles = new Vector3(0f, angle, 0f);
     }
 }