mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
[SmoothRay] Initial Upload
This commit is contained in:
parent
b5df421bec
commit
c05213d970
9 changed files with 274 additions and 1 deletions
17
SmoothRay/HarmonyPatches.cs
Normal file
17
SmoothRay/HarmonyPatches.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace NAK.SmoothRay.HarmonyPatches;
|
||||
|
||||
class PlayerSetupPatches
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.Start))]
|
||||
static void Post_PlayerSetup_Start(ref PlayerSetup __instance)
|
||||
{
|
||||
var leftSmoother = __instance.vrLeftHandTracker.gameObject.AddComponent<SmoothRayer>();
|
||||
leftSmoother.ray = __instance.leftRay;
|
||||
var rightSmoother = __instance.vrRightHandTracker.gameObject.AddComponent<SmoothRayer>();
|
||||
rightSmoother.ray = __instance.rightRay;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue