NAK_CVR_Mods/TrackedControllerFix/HarmonyPatches.cs
NotAKidoS 62c5eec71a [TrackedControllerFix] Slight cleanup for consistancy with SmoothRay.
TrackedControllerFix must do stuff in Awake so SmoothRay can handle the SteamVRTrackedObject in Start.
2023-06-14 20:07:55 -05:00

16 lines
No EOL
557 B
C#

using ABI_RC.Core.Player;
using HarmonyLib;
using Valve.VR;
namespace NAK.TrackedControllerFix.HarmonyPatches;
class PlayerSetupPatches
{
[HarmonyPostfix]
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.Start))]
static void Post_PlayerSetup_Start(ref PlayerSetup __instance)
{
__instance.vrLeftHandTracker.AddComponent<TrackedControllerFixer>().inputSource = SteamVR_Input_Sources.LeftHand;
__instance.vrRightHandTracker.AddComponent<TrackedControllerFixer>().inputSource = SteamVR_Input_Sources.RightHand;
}
}