Skip to content

Commit

Permalink
Fix the Issue PatHightree#32
Browse files Browse the repository at this point in the history
The offsets of rotation have been modified, so than it can rotate in editor and play mode.
  • Loading branch information
JiapengChi committed Aug 10, 2021
1 parent dcf08f3 commit 4e41496
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Runtime/SpaceNavigatorHID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@ public struct ReportFormat3
[InputControl(name = "translation/x", offset = 0, format = "SHRT", parameters = "scale=true, scaleFactor=10")]
[InputControl(name = "translation/y", offset = 4, format = "SHRT", parameters = "scale=true, scaleFactor=-10")]
[InputControl(name = "translation/z", offset = 2, format = "SHRT", parameters = "scale=true, scaleFactor=-10")]

[InputControl(name = "rotation", format = "VC3S", layout = "Vector3", displayName = "Rotation")]
[InputControl(name = "rotation/x", offset = 7, format = "SHRT", parameters = "scale=true, scaleFactor=-10")]
[InputControl(name = "rotation/y", offset = 9, format = "SHRT", parameters = "scale=true, scaleFactor=10")]
[InputControl(name = "rotation/z", offset = 11, format = "SHRT", parameters = "scale=true, scaleFactor=10")]

public ReportFormat1 report1;

// 2nd report
[InputControl(name = "rotation", format = "VC3S", layout = "Vector3", displayName = "Rotation")]
[InputControl(name = "rotation/x", offset = 0, format = "SHRT", parameters = "scale=true, scaleFactor=-80")]
[InputControl(name = "rotation/y", offset = 4, format = "SHRT", parameters = "scale=true, scaleFactor=80")]
[InputControl(name = "rotation/z", offset = 2, format = "SHRT", parameters = "scale=true, scaleFactor=80")]

public ReportFormat2 report2;

// 3rd report
Expand Down

0 comments on commit 4e41496

Please sign in to comment.