Skip to content

Commit

Permalink
add 3d model for Thrustmaster Rudder
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjarv committed Apr 1, 2018
1 parent 42a8830 commit 74c8928
Show file tree
Hide file tree
Showing 11 changed files with 201 additions and 2 deletions.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

public class ThrustmasterTFlightRudder : MonoBehaviour {
public const string USB_ID = "044f:b679";
//public const string USB_ID = "06a3:0764";

public GameObject Model;

public GameObject CenterIndicator;

public GameObject LeftPedal;
public GameObject RightPedal;

Expand Down Expand Up @@ -43,8 +46,9 @@ void StickEvent(JoystickState state)
break;

case "Z":
LeftPedal.transform.localPosition = new Vector3(LeftPedal.transform.localPosition.x, ConvertRange(entry.Value, 0, 65535, 1.2, -1.2), LeftPedal.transform.localPosition.z);
RightPedal.transform.localPosition = new Vector3(RightPedal.transform.localPosition.x, ConvertRange(entry.Value, 0, 65535, -1.2, 1.2), RightPedal.transform.localPosition.z);
LeftPedal.transform.localPosition = new Vector3(LeftPedal.transform.localPosition.x, ConvertRange(entry.Value, 0, 65535, 2.0, -1.2), LeftPedal.transform.localPosition.z);
RightPedal.transform.localPosition = new Vector3(RightPedal.transform.localPosition.x, ConvertRange(entry.Value, 0, 65535, -1.2, 2.0), RightPedal.transform.localPosition.z);
CenterIndicator.transform.localEulerAngles = new Vector3(0, 0, ConvertRange(entry.Value, 0, 65535, 30, -30));
break;
case "Y": // Left brake
LeftPedalBrake.transform.localEulerAngles = new Vector3(ConvertRange(entry.Value, 0, 65535, -20, 0), 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

public class ThrustmasterTFlightRudderCarMode : MonoBehaviour {
public const string USB_ID = "044f:b678";
//public const string USB_ID = "06a3:0764";

public GameObject Model;

Expand Down
Binary file modified JoystickVisualizer/Assets/JoystickVisualizer.unity
Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions JoystickVisualizer/Assets/Materials/Black Plastic Gloss.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added JoystickVisualizer/Assets/Materials/Chrome.mat
Binary file not shown.
10 changes: 10 additions & 0 deletions JoystickVisualizer/Assets/Materials/Chrome.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 74c8928

Please sign in to comment.