mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-04 19:09:23 +00:00
Too many changes
This commit is contained in:
parent
45557943c4
commit
a22e5992d0
72 changed files with 1064 additions and 927 deletions
|
@ -1,10 +1,13 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ml_asl
|
||||
{
|
||||
public class AvatarSyncedLook : MelonLoader.MelonMod
|
||||
{
|
||||
readonly static Matrix4x4 ms_back = Matrix4x4.Translate(Vector3.back);
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
|
@ -19,7 +22,14 @@ namespace ml_asl
|
|||
static void OnPlayerAvatarMovementDataUpdate_Postfix(ref PlayerSetup __instance, PlayerAvatarMovementData ____playerAvatarMovementData)
|
||||
{
|
||||
if(Settings.Enabled && (__instance.EyeMovementController != null))
|
||||
{
|
||||
____playerAvatarMovementData.EyeTrackingOverride = true;
|
||||
|
||||
if(__instance.EyeMovementController.CurrentTarget != null)
|
||||
____playerAvatarMovementData.EyeTrackingPosition = __instance.EyeMovementController.CurrentTarget.GetPosition();
|
||||
else
|
||||
____playerAvatarMovementData.EyeTrackingPosition = (__instance.transform.GetMatrix() * ms_back).GetPosition();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue