Fix for PuppetMaster 1.4

Archived DesktopHeadTracking and ViveEyeTracking
This commit is contained in:
SDraw 2025-08-17 09:37:39 +03:00
parent b21d5497d9
commit 01a833f46d
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
24 changed files with 430 additions and 441 deletions

View file

Before

Width:  |  Height:  |  Size: 291 KiB

After

Width:  |  Height:  |  Size: 291 KiB

Before After
Before After

View file

@ -1,29 +1,29 @@
namespace ml_dht namespace ml_dht
{ {
class DataParser class DataParser
{ {
MemoryMapReader m_mapReader = null; MemoryMapReader m_mapReader = null;
byte[] m_buffer = null; byte[] m_buffer = null;
TrackingData m_trackingData; TrackingData m_trackingData;
public DataParser() public DataParser()
{ {
m_buffer = new byte[1024]; m_buffer = new byte[1024];
m_mapReader = new MemoryMapReader(); m_mapReader = new MemoryMapReader();
m_mapReader.Open("head/data"); m_mapReader.Open("head/data");
} }
~DataParser() ~DataParser()
{ {
m_mapReader.Close(); m_mapReader.Close();
m_mapReader = null; m_mapReader = null;
} }
public void Update() public void Update()
{ {
if(m_mapReader.Read(ref m_buffer)) if(m_mapReader.Read(ref m_buffer))
m_trackingData = TrackingData.ToObject(m_buffer); m_trackingData = TrackingData.ToObject(m_buffer);
} }
public ref TrackingData GetLatestTrackingData() => ref m_trackingData; public ref TrackingData GetLatestTrackingData() => ref m_trackingData;
} }
} }

View file

@ -1,252 +1,252 @@
using ABI.CCK.Components; using ABI.CCK.Components;
using ABI_RC.Core.Player; using ABI_RC.Core.Player;
using ABI_RC.Core.Player.EyeMovement; using ABI_RC.Core.Player.EyeMovement;
using ABI_RC.Systems.FaceTracking; using ABI_RC.Systems.FaceTracking;
using ABI_RC.Systems.GameEventSystem; using ABI_RC.Systems.GameEventSystem;
using ABI_RC.Systems.IK; using ABI_RC.Systems.IK;
using ABI_RC.Systems.VRModeSwitch; using ABI_RC.Systems.VRModeSwitch;
using RootMotion.FinalIK; using RootMotion.FinalIK;
using System; using System;
using UnityEngine; using UnityEngine;
using ViveSR.anipal.Lip; using ViveSR.anipal.Lip;
namespace ml_dht namespace ml_dht
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
class HeadTracked : MonoBehaviour class HeadTracked : MonoBehaviour
{ {
static HeadTracked ms_instance = null; static HeadTracked ms_instance = null;
CVRAvatar m_avatarDescriptor = null; CVRAvatar m_avatarDescriptor = null;
Transform m_camera = null; Transform m_camera = null;
LookAtIK m_lookIK = null; LookAtIK m_lookIK = null;
Transform m_headBone = null; Transform m_headBone = null;
Vector3 m_headPosition; Vector3 m_headPosition;
Quaternion m_headRotation; Quaternion m_headRotation;
Vector2 m_gazeDirection; Vector2 m_gazeDirection;
float m_blinkProgress = 0f; float m_blinkProgress = 0f;
LipData_v2 m_lipData; LipData_v2 m_lipData;
bool m_lipDataSent = false; bool m_lipDataSent = false;
Quaternion m_bindRotation; Quaternion m_bindRotation;
Quaternion m_lastHeadRotation; Quaternion m_lastHeadRotation;
DataParser m_dataParser = null; DataParser m_dataParser = null;
float m_smoothing = 0.5f; float m_smoothing = 0.5f;
internal HeadTracked() internal HeadTracked()
{ {
m_lipData = new LipData_v2(); m_lipData = new LipData_v2();
m_lipData.frame = 0; m_lipData.frame = 0;
m_lipData.time = 0; m_lipData.time = 0;
m_lipData.image = IntPtr.Zero; m_lipData.image = IntPtr.Zero;
m_lipData.prediction_data = new PredictionData_v2(); m_lipData.prediction_data = new PredictionData_v2();
m_lipData.prediction_data.blend_shape_weight = new float[(int)LipShape_v2.Max]; m_lipData.prediction_data.blend_shape_weight = new float[(int)LipShape_v2.Max];
} }
// Unity events // Unity events
void Awake() void Awake()
{ {
if(ms_instance != null) if(ms_instance != null)
{ {
DestroyImmediate(this); DestroyImmediate(this);
return; return;
} }
ms_instance = this; ms_instance = this;
DontDestroyOnLoad(this); DontDestroyOnLoad(this);
m_dataParser = new DataParser(); m_dataParser = new DataParser();
} }
void Start() void Start()
{ {
OnSmoothingChanged(Settings.Smoothing); OnSmoothingChanged(Settings.Smoothing);
OnVRModeSwitch(true); OnVRModeSwitch(true);
Settings.OnEnabledChanged.AddListener(this.OnEnabledOrHeadTrackingChanged); Settings.OnEnabledChanged.AddListener(this.OnEnabledOrHeadTrackingChanged);
Settings.OnHeadTrackingChanged.AddListener(this.OnEnabledOrHeadTrackingChanged); Settings.OnHeadTrackingChanged.AddListener(this.OnEnabledOrHeadTrackingChanged);
Settings.OnSmoothingChanged.AddListener(this.OnSmoothingChanged); Settings.OnSmoothingChanged.AddListener(this.OnSmoothingChanged);
CVRGameEventSystem.Avatar.OnLocalAvatarLoad.AddListener(this.OnAvatarSetup); CVRGameEventSystem.Avatar.OnLocalAvatarLoad.AddListener(this.OnAvatarSetup);
CVRGameEventSystem.Avatar.OnLocalAvatarClear.AddListener(this.OnAvatarClear); CVRGameEventSystem.Avatar.OnLocalAvatarClear.AddListener(this.OnAvatarClear);
GameEvents.OnAvatarReuse.AddListener(this.OnAvatarReuse); GameEvents.OnAvatarReuse.AddListener(this.OnAvatarReuse);
GameEvents.OnEyeControllerUpdate.AddListener(this.OnEyeControllerUpdate); GameEvents.OnEyeControllerUpdate.AddListener(this.OnEyeControllerUpdate);
GameEvents.OnFaceTrackingUpdate.AddListener(this.UpdateFaceTracking); GameEvents.OnFaceTrackingUpdate.AddListener(this.UpdateFaceTracking);
VRModeSwitchEvents.OnCompletedVRModeSwitch.AddListener(this.OnVRModeSwitch); VRModeSwitchEvents.OnCompletedVRModeSwitch.AddListener(this.OnVRModeSwitch);
} }
void OnDestroy() void OnDestroy()
{ {
if(ms_instance == this) if(ms_instance == this)
ms_instance = null; ms_instance = null;
m_dataParser = null; m_dataParser = null;
Settings.OnEnabledChanged.RemoveListener(this.OnEnabledOrHeadTrackingChanged); Settings.OnEnabledChanged.RemoveListener(this.OnEnabledOrHeadTrackingChanged);
Settings.OnHeadTrackingChanged.RemoveListener(this.OnEnabledOrHeadTrackingChanged); Settings.OnHeadTrackingChanged.RemoveListener(this.OnEnabledOrHeadTrackingChanged);
Settings.OnSmoothingChanged.RemoveListener(this.OnSmoothingChanged); Settings.OnSmoothingChanged.RemoveListener(this.OnSmoothingChanged);
CVRGameEventSystem.Avatar.OnLocalAvatarLoad.RemoveListener(this.OnAvatarSetup); CVRGameEventSystem.Avatar.OnLocalAvatarLoad.RemoveListener(this.OnAvatarSetup);
CVRGameEventSystem.Avatar.OnLocalAvatarClear.RemoveListener(this.OnAvatarClear); CVRGameEventSystem.Avatar.OnLocalAvatarClear.RemoveListener(this.OnAvatarClear);
GameEvents.OnAvatarReuse.RemoveListener(this.OnAvatarReuse); GameEvents.OnAvatarReuse.RemoveListener(this.OnAvatarReuse);
GameEvents.OnEyeControllerUpdate.RemoveListener(this.OnEyeControllerUpdate); GameEvents.OnEyeControllerUpdate.RemoveListener(this.OnEyeControllerUpdate);
GameEvents.OnFaceTrackingUpdate.RemoveListener(this.UpdateFaceTracking); GameEvents.OnFaceTrackingUpdate.RemoveListener(this.UpdateFaceTracking);
VRModeSwitchEvents.OnCompletedVRModeSwitch.RemoveListener(this.OnVRModeSwitch); VRModeSwitchEvents.OnCompletedVRModeSwitch.RemoveListener(this.OnVRModeSwitch);
} }
void Update() void Update()
{ {
if(m_lipDataSent) if(m_lipDataSent)
m_lipDataSent = false; m_lipDataSent = false;
if(Settings.Enabled && (m_dataParser != null)) if(Settings.Enabled && (m_dataParser != null))
{ {
m_dataParser.Update(); m_dataParser.Update();
UpdateTrackingData(ref m_dataParser.GetLatestTrackingData()); UpdateTrackingData(ref m_dataParser.GetLatestTrackingData());
} }
} }
// Tracking updates // Tracking updates
public void UpdateTrackingData(ref TrackingData p_data) public void UpdateTrackingData(ref TrackingData p_data)
{ {
m_headPosition.Set(p_data.m_headPositionX * (Settings.Mirrored ? -1f : 1f), p_data.m_headPositionY, p_data.m_headPositionZ); m_headPosition.Set(p_data.m_headPositionX * (Settings.Mirrored ? -1f : 1f), p_data.m_headPositionY, p_data.m_headPositionZ);
m_headRotation.Set(p_data.m_headRotationX, p_data.m_headRotationY * (Settings.Mirrored ? -1f : 1f), p_data.m_headRotationZ * (Settings.Mirrored ? -1f : 1f), p_data.m_headRotationW); m_headRotation.Set(p_data.m_headRotationX, p_data.m_headRotationY * (Settings.Mirrored ? -1f : 1f), p_data.m_headRotationZ * (Settings.Mirrored ? -1f : 1f), p_data.m_headRotationW);
m_gazeDirection.Set(Settings.Mirrored ? (1f - p_data.m_gazeX) : p_data.m_gazeX, p_data.m_gazeY); m_gazeDirection.Set(Settings.Mirrored ? (1f - p_data.m_gazeX) : p_data.m_gazeX, p_data.m_gazeY);
m_blinkProgress = p_data.m_blink; m_blinkProgress = p_data.m_blink;
float l_weight = Mathf.Clamp01(Mathf.InverseLerp(0.25f, 1f, Mathf.Abs(p_data.m_mouthShape))); float l_weight = Mathf.Clamp01(Mathf.InverseLerp(0.25f, 1f, Mathf.Abs(p_data.m_mouthShape)));
m_lipData.prediction_data.blend_shape_weight[(int)LipShape_v2.Jaw_Open] = p_data.m_mouthOpen; m_lipData.prediction_data.blend_shape_weight[(int)LipShape_v2.Jaw_Open] = p_data.m_mouthOpen;
m_lipData.prediction_data.blend_shape_weight[(int)LipShape_v2.Mouth_Pout] = ((p_data.m_mouthShape > 0f) ? l_weight : 0f); m_lipData.prediction_data.blend_shape_weight[(int)LipShape_v2.Mouth_Pout] = ((p_data.m_mouthShape > 0f) ? l_weight : 0f);
m_lipData.prediction_data.blend_shape_weight[(int)LipShape_v2.Mouth_Smile_Left] = ((p_data.m_mouthShape < 0f) ? l_weight : 0f); m_lipData.prediction_data.blend_shape_weight[(int)LipShape_v2.Mouth_Smile_Left] = ((p_data.m_mouthShape < 0f) ? l_weight : 0f);
m_lipData.prediction_data.blend_shape_weight[(int)LipShape_v2.Mouth_Smile_Right] = ((p_data.m_mouthShape < 0f) ? l_weight : 0f); m_lipData.prediction_data.blend_shape_weight[(int)LipShape_v2.Mouth_Smile_Right] = ((p_data.m_mouthShape < 0f) ? l_weight : 0f);
} }
void OnLookIKPostUpdate() void OnLookIKPostUpdate()
{ {
if(Settings.Enabled && Settings.HeadTracking && (m_headBone != null)) if(Settings.Enabled && Settings.HeadTracking && (m_headBone != null))
{ {
m_lastHeadRotation = Quaternion.Slerp(m_lastHeadRotation, m_avatarDescriptor.transform.rotation * (m_headRotation * m_bindRotation), m_smoothing); m_lastHeadRotation = Quaternion.Slerp(m_lastHeadRotation, m_avatarDescriptor.transform.rotation * (m_headRotation * m_bindRotation), m_smoothing);
if(!PlayerSetup.Instance.IsEmotePlaying) if(!PlayerSetup.Instance.IsEmotePlaying)
m_headBone.rotation = m_lastHeadRotation; m_headBone.rotation = m_lastHeadRotation;
} }
} }
// Game events // Game events
internal void OnAvatarSetup(CVRAvatar p_avatar) internal void OnAvatarSetup(CVRAvatar p_avatar)
{ {
try try
{ {
m_camera = PlayerSetup.Instance.activeCam.transform; m_camera = PlayerSetup.Instance.activeCam.transform;
m_avatarDescriptor = PlayerSetup.Instance.AvatarObject.GetComponent<CVRAvatar>(); m_avatarDescriptor = PlayerSetup.Instance.AvatarObject.GetComponent<CVRAvatar>();
if(PlayerSetup.Instance.Animator.isHuman) if(PlayerSetup.Instance.Animator.isHuman)
{ {
IKSystem.Instance.SetAvatarPose(IKSystem.AvatarPose.TPose); IKSystem.Instance.SetAvatarPose(IKSystem.AvatarPose.TPose);
PlayerSetup.Instance.AvatarTransform.localPosition = Vector3.zero; PlayerSetup.Instance.AvatarTransform.localPosition = Vector3.zero;
PlayerSetup.Instance.AvatarTransform.localRotation = Quaternion.identity; PlayerSetup.Instance.AvatarTransform.localRotation = Quaternion.identity;
m_headBone = PlayerSetup.Instance.Animator.GetBoneTransform(HumanBodyBones.Head); m_headBone = PlayerSetup.Instance.Animator.GetBoneTransform(HumanBodyBones.Head);
if(m_headBone != null) if(m_headBone != null)
m_bindRotation = Quaternion.Inverse(m_avatarDescriptor.transform.rotation) * m_headBone.rotation; m_bindRotation = Quaternion.Inverse(m_avatarDescriptor.transform.rotation) * m_headBone.rotation;
m_lookIK = PlayerSetup.Instance.AvatarObject.GetComponent<LookAtIK>(); m_lookIK = PlayerSetup.Instance.AvatarObject.GetComponent<LookAtIK>();
if(m_lookIK != null) if(m_lookIK != null)
m_lookIK.onPostSolverUpdate.AddListener(this.OnLookIKPostUpdate); m_lookIK.onPostSolverUpdate.AddListener(this.OnLookIKPostUpdate);
} }
} }
catch(Exception e) catch(Exception e)
{ {
MelonLoader.MelonLogger.Error(e); MelonLoader.MelonLogger.Error(e);
} }
} }
void OnAvatarClear(CVRAvatar p_avatar) void OnAvatarClear(CVRAvatar p_avatar)
{ {
try try
{ {
m_avatarDescriptor = null; m_avatarDescriptor = null;
m_lookIK = null; m_lookIK = null;
m_headBone = null; m_headBone = null;
m_lastHeadRotation = Quaternion.identity; m_lastHeadRotation = Quaternion.identity;
m_bindRotation = Quaternion.identity; m_bindRotation = Quaternion.identity;
} }
catch(Exception e) catch(Exception e)
{ {
MelonLoader.MelonLogger.Error(e); MelonLoader.MelonLogger.Error(e);
} }
} }
void OnAvatarReuse() void OnAvatarReuse()
{ {
m_camera = PlayerSetup.Instance.activeCam.transform; m_camera = PlayerSetup.Instance.activeCam.transform;
m_lookIK = PlayerSetup.Instance.AvatarObject.GetComponent<LookAtIK>(); m_lookIK = PlayerSetup.Instance.AvatarObject.GetComponent<LookAtIK>();
if(m_lookIK != null) if(m_lookIK != null)
m_lookIK.onPostSolverUpdate.AddListener(this.OnLookIKPostUpdate); m_lookIK.onPostSolverUpdate.AddListener(this.OnLookIKPostUpdate);
} }
void OnEyeControllerUpdate(EyeMovementController p_component) void OnEyeControllerUpdate(EyeMovementController p_component)
{ {
if(this.enabled && Settings.Enabled) if(this.enabled && Settings.Enabled)
{ {
// Gaze // Gaze
if(Settings.EyeTracking && (m_camera != null)) if(Settings.EyeTracking && (m_camera != null))
{ {
p_component.manualViewTarget = true; p_component.manualViewTarget = true;
p_component.targetViewPosition = m_camera.position + m_camera.rotation * new Vector3((m_gazeDirection.x - 0.5f) * 2f, (m_gazeDirection.y - 0.5f) * 2f, 1f); p_component.targetViewPosition = m_camera.position + m_camera.rotation * new Vector3((m_gazeDirection.x - 0.5f) * 2f, (m_gazeDirection.y - 0.5f) * 2f, 1f);
} }
// Blink // Blink
if(Settings.Blinking) if(Settings.Blinking)
{ {
p_component.manualBlinking = true; p_component.manualBlinking = true;
p_component.blinkProgressLeft = m_blinkProgress; p_component.blinkProgressLeft = m_blinkProgress;
p_component.blinkProgressRight = m_blinkProgress; p_component.blinkProgressRight = m_blinkProgress;
} }
} }
} }
void UpdateFaceTracking(CVRFaceTracking p_component, GameEvents.EventResult p_result) void UpdateFaceTracking(CVRFaceTracking p_component, GameEvents.EventResult p_result)
{ {
if(this.enabled && Settings.Enabled && Settings.FaceTracking && p_component.isLocal && p_component.UseFacialTracking) if(this.enabled && Settings.Enabled && Settings.FaceTracking && p_component.isLocal && p_component.UseFacialTracking)
{ {
if(!m_lipDataSent) if(!m_lipDataSent)
{ {
FaceTrackingManager.Instance.SubmitNewFacialData(m_lipData); FaceTrackingManager.Instance.SubmitNewFacialData(m_lipData);
m_lipDataSent = true; m_lipDataSent = true;
} }
p_component.LipSyncWasUpdated = true; p_component.LipSyncWasUpdated = true;
p_component.UpdateShapesLocal_Private(); p_component.UpdateShapesLocal_Private();
p_result.m_result |= true; p_result.m_result |= true;
} }
} }
void OnVRModeSwitch(bool p_state) void OnVRModeSwitch(bool p_state)
{ {
try try
{ {
this.enabled = !Utils.IsInVR(); this.enabled = !Utils.IsInVR();
} }
catch(Exception e) catch(Exception e)
{ {
MelonLoader.MelonLogger.Error(e); MelonLoader.MelonLogger.Error(e);
} }
} }
// Settings // Settings
void OnEnabledOrHeadTrackingChanged(bool p_state) void OnEnabledOrHeadTrackingChanged(bool p_state)
{ {
if(Settings.Enabled && Settings.HeadTracking) if(Settings.Enabled && Settings.HeadTracking)
m_lastHeadRotation = ((m_headBone != null) ? m_headBone.rotation : m_bindRotation); m_lastHeadRotation = ((m_headBone != null) ? m_headBone.rotation : m_bindRotation);
} }
void OnSmoothingChanged(float p_value) void OnSmoothingChanged(float p_value)
{ {
m_smoothing = 1f - Mathf.Clamp(p_value, 0f, 0.99f); m_smoothing = 1f - Mathf.Clamp(p_value, 0f, 0.99f);
} }
} }
} }

View file

@ -1,40 +1,40 @@
using ABI_RC.Core.Player; using ABI_RC.Core.Player;
using ABI_RC.Core.Savior; using ABI_RC.Core.Savior;
using UnityEngine; using UnityEngine;
namespace ml_dht namespace ml_dht
{ {
public class DesktopHeadTracking : MelonLoader.MelonMod public class DesktopHeadTracking : MelonLoader.MelonMod
{ {
HeadTracked m_tracked = null; HeadTracked m_tracked = null;
public override void OnInitializeMelon() public override void OnInitializeMelon()
{ {
Settings.Init(); Settings.Init();
GameEvents.InitA(HarmonyInstance); GameEvents.InitA(HarmonyInstance);
MelonLoader.MelonCoroutines.Start(WaitForInstances()); MelonLoader.MelonCoroutines.Start(WaitForInstances());
} }
System.Collections.IEnumerator WaitForInstances() System.Collections.IEnumerator WaitForInstances()
{ {
while(MetaPort.Instance == null) while(MetaPort.Instance == null)
yield return null; yield return null;
while(PlayerSetup.Instance == null) while(PlayerSetup.Instance == null)
yield return null; yield return null;
GameEvents.InitB(HarmonyInstance); GameEvents.InitB(HarmonyInstance);
m_tracked = new GameObject("[DesktopHeadTracking]").AddComponent<HeadTracked>(); m_tracked = new GameObject("[DesktopHeadTracking]").AddComponent<HeadTracked>();
} }
public override void OnDeinitializeMelon() public override void OnDeinitializeMelon()
{ {
if(m_tracked != null) if(m_tracked != null)
Object.Destroy(m_tracked.gameObject); Object.Destroy(m_tracked.gameObject);
m_tracked = null; m_tracked = null;
} }
} }
} }

View file

@ -1,4 +1,4 @@
[assembly: MelonLoader.MelonInfo(typeof(ml_dht.DesktopHeadTracking), "DesktopHeadTracking", "1.3.4", "SDraw", "https://github.com/SDraw/ml_mods_cvr")] [assembly: MelonLoader.MelonInfo(typeof(ml_dht.DesktopHeadTracking), "DesktopHeadTracking", "1.3.4", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: MelonLoader.MelonGame(null, "ChilloutVR")] [assembly: MelonLoader.MelonGame(null, "ChilloutVR")]
[assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] [assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
[assembly: MelonLoader.MelonPlatformDomain(MelonLoader.MelonPlatformDomainAttribute.CompatibleDomains.MONO)] [assembly: MelonLoader.MelonPlatformDomain(MelonLoader.MelonPlatformDomainAttribute.CompatibleDomains.MONO)]

View file

@ -1,20 +1,20 @@
using ABI.CCK.Components; using ABI.CCK.Components;
using ABI_RC.Core.Savior; using ABI_RC.Core.Savior;
using ABI_RC.Core.UI; using ABI_RC.Core.UI;
using System.Reflection; using System.Reflection;
namespace ml_dht namespace ml_dht
{ {
static class Utils static class Utils
{ {
static readonly object[] ms_emptyArray = new object[0]; static readonly object[] ms_emptyArray = new object[0];
static readonly FieldInfo ms_view = typeof(CohtmlControlledViewWrapper).GetField("_view", BindingFlags.Instance | BindingFlags.NonPublic); static readonly FieldInfo ms_view = typeof(CohtmlControlledViewWrapper).GetField("_view", BindingFlags.Instance | BindingFlags.NonPublic);
static readonly MethodInfo ms_updateShapesLocal = typeof(CVRFaceTracking).GetMethod("UpdateShapesLocal", BindingFlags.Instance | BindingFlags.NonPublic); static readonly MethodInfo ms_updateShapesLocal = typeof(CVRFaceTracking).GetMethod("UpdateShapesLocal", BindingFlags.Instance | BindingFlags.NonPublic);
public static bool IsInVR() => ((MetaPort.Instance != null) && MetaPort.Instance.isUsingVr); public static bool IsInVR() => ((MetaPort.Instance != null) && MetaPort.Instance.isUsingVr);
public static void ExecuteScript(this CohtmlControlledViewWrapper p_instance, string p_script) => (ms_view?.GetValue(p_instance) as cohtml.Net.View)?.ExecuteScript(p_script); public static void ExecuteScript(this CohtmlControlledViewWrapper p_instance, string p_script) => (ms_view?.GetValue(p_instance) as cohtml.Net.View)?.ExecuteScript(p_script);
public static void UpdateShapesLocal_Private(this CVRFaceTracking p_instance) => ms_updateShapesLocal?.Invoke(p_instance, ms_emptyArray); public static void UpdateShapesLocal_Private(this CVRFaceTracking p_instance) => ms_updateShapesLocal?.Invoke(p_instance, ms_emptyArray);
} }
} }

View file

@ -1,85 +1,85 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<PackageId>DesktopHeadTracking</PackageId> <PackageId>DesktopHeadTracking</PackageId>
<Authors>SDraw</Authors> <Authors>SDraw</Authors>
<Company>SDraw</Company> <Company>SDraw</Company>
<Product>DesktopHeadTracking</Product> <Product>DesktopHeadTracking</Product>
<Version>1.3.4</Version> <Version>1.3.4</Version>
<Platforms>x64</Platforms> <Platforms>x64</Platforms>
<AssemblyName>DesktopHeadTracking</AssemblyName> <AssemblyName>DesktopHeadTracking</AssemblyName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<DebugType>embedded</DebugType> <DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Remove="DesktopHeadTracking.json" /> <None Remove="DesktopHeadTracking.json" />
<None Remove="resources\mod_menu.js" /> <None Remove="resources\mod_menu.js" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="resources\mod_menu.js" /> <EmbeddedResource Include="resources\mod_menu.js" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="..\js\mods_extension.js" Link="resources\mods_extension.js" /> <EmbeddedResource Include="..\js\mods_extension.js" Link="resources\mods_extension.js" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="0Harmony"> <Reference Include="0Harmony">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\0Harmony.dll</HintPath> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\0Harmony.dll</HintPath>
<SpecificVersion>false</SpecificVersion> <SpecificVersion>false</SpecificVersion>
<Private>false</Private> <Private>false</Private>
</Reference> </Reference>
<Reference Include="Assembly-CSharp"> <Reference Include="Assembly-CSharp">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>false</Private> <Private>false</Private>
<SpecificVersion>false</SpecificVersion> <SpecificVersion>false</SpecificVersion>
</Reference> </Reference>
<Reference Include="Assembly-CSharp-firstpass"> <Reference Include="Assembly-CSharp-firstpass">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
<Private>false</Private> <Private>false</Private>
<SpecificVersion>false</SpecificVersion> <SpecificVersion>false</SpecificVersion>
</Reference> </Reference>
<Reference Include="cohtml.Net"> <Reference Include="cohtml.Net">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\cohtml.Net.dll</HintPath> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\cohtml.Net.dll</HintPath>
<Private>false</Private> <Private>false</Private>
<SpecificVersion>false</SpecificVersion> <SpecificVersion>false</SpecificVersion>
</Reference> </Reference>
<Reference Include="Cohtml.Runtime"> <Reference Include="Cohtml.Runtime">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Cohtml.Runtime.dll</HintPath> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Cohtml.Runtime.dll</HintPath>
<Private>false</Private> <Private>false</Private>
<SpecificVersion>false</SpecificVersion> <SpecificVersion>false</SpecificVersion>
</Reference> </Reference>
<Reference Include="MelonLoader"> <Reference Include="MelonLoader">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\MelonLoader.dll</HintPath> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\MelonLoader.dll</HintPath>
<SpecificVersion>false</SpecificVersion> <SpecificVersion>false</SpecificVersion>
<Private>false</Private> <Private>false</Private>
</Reference> </Reference>
<Reference Include="UnityEngine"> <Reference Include="UnityEngine">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.dll</HintPath> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.dll</HintPath>
<Private>false</Private> <Private>false</Private>
<SpecificVersion>false</SpecificVersion> <SpecificVersion>false</SpecificVersion>
</Reference> </Reference>
<Reference Include="UnityEngine.AnimationModule"> <Reference Include="UnityEngine.AnimationModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll</HintPath> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
<Private>false</Private> <Private>false</Private>
<SpecificVersion>false</SpecificVersion> <SpecificVersion>false</SpecificVersion>
</Reference> </Reference>
<Reference Include="UnityEngine.CoreModule"> <Reference Include="UnityEngine.CoreModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>false</Private> <Private>false</Private>
<SpecificVersion>false</SpecificVersion> <SpecificVersion>false</SpecificVersion>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> <Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy /y &quot;$(TargetPath)&quot; &quot;D:\Games\Steam\steamapps\common\ChilloutVR\Mods\&quot;" /> <Exec Command="copy /y &quot;$(TargetPath)&quot; &quot;D:\Games\Steam\steamapps\common\ChilloutVR\Mods\&quot;" />
</Target> </Target>
</Project> </Project>

View file

@ -22,17 +22,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_asl", "ml_asl\ml_asl.csp
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_pin", "ml_pin\ml_pin.csproj", "{7E493C28-7202-46F8-9789-D6C6FF7E5241}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_pin", "ml_pin\ml_pin.csproj", "{7E493C28-7202-46F8-9789-D6C6FF7E5241}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_dht", "ml_dht\ml_dht.csproj", "{31987392-989C-40C1-A48B-7F6099816EBE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_bft", "ml_bft\ml_bft.csproj", "{331C995D-9648-44AD-8B02-D5F3A89FDC1F}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_bft", "ml_bft\ml_bft.csproj", "{331C995D-9648-44AD-8B02-D5F3A89FDC1F}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_vpc", "ml_vpc\ml_vpc.csproj", "{7CF37B93-9341-422D-845C-9AB96DB4D0A1}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_vpc", "ml_vpc\ml_vpc.csproj", "{7CF37B93-9341-422D-845C-9AB96DB4D0A1}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_ppu", "ml_ppu\ml_ppu.csproj", "{F16DF16B-D127-4A2A-81FF-2FD80F320E64}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_ppu", "ml_ppu\ml_ppu.csproj", "{F16DF16B-D127-4A2A-81FF-2FD80F320E64}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_vet", "ml_vet\ml_vet.csproj", "{8DB32590-FC5B-46A8-9747-344E86B18ACF}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_pah", "ml_pah\ml_pah.csproj", "{C4659F60-3FED-4F43-88E4-969907D4C7A6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ml_pah", "ml_pah\ml_pah.csproj", "{C4659F60-3FED-4F43-88E4-969907D4C7A6}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -66,10 +62,6 @@ Global
{7E493C28-7202-46F8-9789-D6C6FF7E5241}.Debug|x64.ActiveCfg = Debug|x64 {7E493C28-7202-46F8-9789-D6C6FF7E5241}.Debug|x64.ActiveCfg = Debug|x64
{7E493C28-7202-46F8-9789-D6C6FF7E5241}.Release|x64.ActiveCfg = Release|x64 {7E493C28-7202-46F8-9789-D6C6FF7E5241}.Release|x64.ActiveCfg = Release|x64
{7E493C28-7202-46F8-9789-D6C6FF7E5241}.Release|x64.Build.0 = Release|x64 {7E493C28-7202-46F8-9789-D6C6FF7E5241}.Release|x64.Build.0 = Release|x64
{31987392-989C-40C1-A48B-7F6099816EBE}.Debug|x64.ActiveCfg = Debug|x64
{31987392-989C-40C1-A48B-7F6099816EBE}.Debug|x64.Build.0 = Debug|x64
{31987392-989C-40C1-A48B-7F6099816EBE}.Release|x64.ActiveCfg = Release|x64
{31987392-989C-40C1-A48B-7F6099816EBE}.Release|x64.Build.0 = Release|x64
{331C995D-9648-44AD-8B02-D5F3A89FDC1F}.Debug|x64.ActiveCfg = Debug|x64 {331C995D-9648-44AD-8B02-D5F3A89FDC1F}.Debug|x64.ActiveCfg = Debug|x64
{331C995D-9648-44AD-8B02-D5F3A89FDC1F}.Release|x64.ActiveCfg = Release|x64 {331C995D-9648-44AD-8B02-D5F3A89FDC1F}.Release|x64.ActiveCfg = Release|x64
{331C995D-9648-44AD-8B02-D5F3A89FDC1F}.Release|x64.Build.0 = Release|x64 {331C995D-9648-44AD-8B02-D5F3A89FDC1F}.Release|x64.Build.0 = Release|x64
@ -81,10 +73,6 @@ Global
{F16DF16B-D127-4A2A-81FF-2FD80F320E64}.Debug|x64.Build.0 = Debug|x64 {F16DF16B-D127-4A2A-81FF-2FD80F320E64}.Debug|x64.Build.0 = Debug|x64
{F16DF16B-D127-4A2A-81FF-2FD80F320E64}.Release|x64.ActiveCfg = Release|x64 {F16DF16B-D127-4A2A-81FF-2FD80F320E64}.Release|x64.ActiveCfg = Release|x64
{F16DF16B-D127-4A2A-81FF-2FD80F320E64}.Release|x64.Build.0 = Release|x64 {F16DF16B-D127-4A2A-81FF-2FD80F320E64}.Release|x64.Build.0 = Release|x64
{8DB32590-FC5B-46A8-9747-344E86B18ACF}.Debug|x64.ActiveCfg = Debug|x64
{8DB32590-FC5B-46A8-9747-344E86B18ACF}.Debug|x64.Build.0 = Debug|x64
{8DB32590-FC5B-46A8-9747-344E86B18ACF}.Release|x64.ActiveCfg = Release|x64
{8DB32590-FC5B-46A8-9747-344E86B18ACF}.Release|x64.Build.0 = Release|x64
{C4659F60-3FED-4F43-88E4-969907D4C7A6}.Debug|x64.ActiveCfg = Debug|x64 {C4659F60-3FED-4F43-88E4-969907D4C7A6}.Debug|x64.ActiveCfg = Debug|x64
{C4659F60-3FED-4F43-88E4-969907D4C7A6}.Release|x64.ActiveCfg = Release|x64 {C4659F60-3FED-4F43-88E4-969907D4C7A6}.Release|x64.ActiveCfg = Release|x64
{C4659F60-3FED-4F43-88E4-969907D4C7A6}.Release|x64.Build.0 = Release|x64 {C4659F60-3FED-4F43-88E4-969907D4C7A6}.Release|x64.Build.0 = Release|x64

View file

@ -347,6 +347,7 @@ namespace ml_prm
BipedRagdollCreator.Options l_options = BipedRagdollCreator.AutodetectOptions(m_puppetReferences); BipedRagdollCreator.Options l_options = BipedRagdollCreator.AutodetectOptions(m_puppetReferences);
l_options.joints = RagdollCreator.JointType.Character; l_options.joints = RagdollCreator.JointType.Character;
l_options.fixFootColliderRotation = false;
BipedRagdollCreator.Create(m_puppetReferences, l_options); BipedRagdollCreator.Create(m_puppetReferences, l_options);
Transform[] l_puppetTransforms = m_puppetReferences.GetRagdollTransforms(); Transform[] l_puppetTransforms = m_puppetReferences.GetRagdollTransforms();