Skip to content

Commit

Permalink
update Logitech 3D Pro with throttle flap
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjarv committed Mar 15, 2018
1 parent de14af8 commit 454b4e0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
public class Logitech3DPro: MonoBehaviour {
public const string USB_ID = "046d:c215";
//public const string USB_ID = "044f:0402";
//public const string USB_ID = "044f:0404";

public GameObject Model;
public GameObject Joystick;
Expand Down Expand Up @@ -45,6 +46,10 @@ void StickEvent(JoystickState state)
case "Y":
Joystick.transform.localEulerAngles = new Vector3(ConvertRange(entry.Value, 0, 65535, 20, -20), Joystick.transform.localEulerAngles.y, Joystick.transform.localEulerAngles.z);
break;

case "RotationZ":
Joystick.transform.localEulerAngles = new Vector3(Joystick.transform.localEulerAngles.x, Joystick.transform.localEulerAngles.y, ConvertRange(entry.Value, 0, 65535, -30, 30));
break;
}
}
}
Expand Down

0 comments on commit 454b4e0

Please sign in to comment.