Skip to content

Commit

Permalink
v1.8.0 - Fix offsets for Quest 2 controllers in all cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffanDonal committed Jan 23, 2022
1 parent e7994a6 commit a658583
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using IPALogger = IPA.Logging.Logger;

[assembly: AssemblyTitle("Claws")]
[assembly: AssemblyFileVersion("1.7.2")]
[assembly: AssemblyFileVersion("1.8.0")]
[assembly: AssemblyCopyright("MIT License - Copyright © 2022 Steffan Donal")]

[assembly: Guid("a563479b-6b8d-41f0-9a23-cdc396dd9cf0")]
Expand Down
18 changes: 15 additions & 3 deletions Preferences.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ internal enum VRControllerType
Touch,
WMR,
Knuckles,
OculusStoreTouch
OculusStoreTouch,
OculusQuest
}

internal static class Preferences
Expand All @@ -39,15 +40,17 @@ internal static class Preferences
{ VRControllerType.Vive, new Vector3(-0.04f, -0.0125f, -0.06f) },
{ VRControllerType.Touch, new Vector3(-0.03f, -0.0225f, -0.095f ) },
{ VRControllerType.Knuckles, new Vector3(-0.04f, -0.0225f, -0.11f) },
{ VRControllerType.OculusStoreTouch, new Vector3(-0.1f, -0.0225f, -0.06f) }
{ VRControllerType.OculusStoreTouch, new Vector3(-0.1f, -0.0225f, -0.06f) },
{ VRControllerType.OculusQuest, new Vector3(-0.05f, -0.01f, -0.1f) }
};
static readonly Dictionary<VRControllerType, Vector3> DefaultRotation = new Dictionary<VRControllerType, Vector3>
{
{ VRControllerType.Unknown, Vector3.zero },
{ VRControllerType.Vive, new Vector3(75f, 0f, 90f) },
{ VRControllerType.Touch, new Vector3(75f, 0f, 90f ) },
{ VRControllerType.Knuckles, new Vector3(75f, 0f, 90f) },
{ VRControllerType.OculusStoreTouch, new Vector3(25f, 0f, 90f) }
{ VRControllerType.OculusStoreTouch, new Vector3(25f, 0f, 90f) },
{ VRControllerType.OculusQuest, new Vector3(75f, -5f, 90f) }
};

public static void Store()
Expand Down Expand Up @@ -122,6 +125,15 @@ static VRControllerType GetActiveControllersType()
*/
if (controller.IndexOf(@"Oculus Touch", StringComparison.InvariantCultureIgnoreCase) >= 0)
return VRControllerType.OculusStoreTouch;
/*
* Known Oculus Quest 2 controller names:
* Oculus Quest2
* Miramar
*/
if (controller.IndexOf(@"Oculus Quest2", StringComparison.InvariantCultureIgnoreCase) >= 0 ||
controller.IndexOf(@"Miramar", StringComparison.InvariantCultureIgnoreCase) >= 0)
return VRControllerType.OculusQuest;

/*
* Known WMR controller names:
* WindowsMR: 0x045e/0x065b/0/2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Beat Saber - Claws v1.7.2
# Beat Saber - Claws v1.8.0

Gameplay modifier that shrinks sabers by 70% (from 1m to 0.3m) & alters grip.

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"gameVersion": "1.19.0",
"id": "claws",
"name": "Claws",
"version": "1.7.2",
"version": "1.8.0",
"features": [
],
"links": {
Expand Down

0 comments on commit a658583

Please sign in to comment.