mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 23:09:22 +00:00
[TrackedControllerFix] Needed changes for SmoothRay Support
This commit is contained in:
parent
ea9ebf374b
commit
b5df421bec
2 changed files with 17 additions and 13 deletions
|
@ -4,16 +4,18 @@ using Valve.VR;
|
|||
|
||||
namespace NAK.TrackedControllerFix.HarmonyPatches;
|
||||
|
||||
internal class PlayerSetupPatches
|
||||
class PlayerSetupPatches
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(PlayerSetup), "Start")]
|
||||
private static void Post_PlayerSetup_Start(ref PlayerSetup __instance)
|
||||
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.Start))]
|
||||
static void Post_PlayerSetup_Start(ref PlayerSetup __instance)
|
||||
{
|
||||
// Add TrackedControllerFix
|
||||
var vrLeftHandTracker = __instance.vrLeftHandTracker.AddComponent<TrackedControllerFixer>();
|
||||
vrLeftHandTracker.inputSource = SteamVR_Input_Sources.LeftHand;
|
||||
var vrRightHandTracker = __instance.vrRightHandTracker.AddComponent<TrackedControllerFixer>();
|
||||
vrRightHandTracker.inputSource = SteamVR_Input_Sources.RightHand;
|
||||
vrLeftHandTracker.Initialize();
|
||||
vrRightHandTracker.Initialize();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue