Update to game build 2023r171

This commit is contained in:
SDraw 2023-07-27 09:48:52 +03:00
parent 2e25d098d8
commit 320846f7d4
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
42 changed files with 724 additions and 1548 deletions

View file

@ -1,16 +1,16 @@
Merged set of MelonLoader mods for ChilloutVR. Merged set of MelonLoader mods for ChilloutVR.
**Table for game build 2022r170p1:** **Table for game build 2022r171:**
| Full name | Short name | Latest version | Available in [CVRMA](https://github.com/knah/CVRMelonAssistant) | | Full name | Short name | Latest version | Available in [CVRMA](https://github.com/knah/CVRMelonAssistant) |
|:---------:|:----------:|:--------------:| :----------------------------------------------------------------| |:---------:|:----------:|:--------------:| :----------------------------------------------------------------|
| [Avatar Motion Tweaker](/ml_amt/README.md) | ml_amt | 1.2.8 [:arrow_down:](../../releases/latest/download/ml_amt.dll) | ✔ Yes | | [Avatar Motion Tweaker](/ml_amt/README.md) | ml_amt | - | ✔ Yes<br>:warning:Broken |
| [Desktop Head Tracking](/ml_dht/README.md)| ml_dht | 1.1.3 [:arrow_down:](../../releases/latest/download/ml_dht.dll)| ✔ Yes | | [Desktop Head Tracking](/ml_dht/README.md)| ml_dht | - | ✔ Yes<br>:warning:Broken |
| [Desktop Reticle Switch](/ml_drs/README.md)| ml_drs | 1.0.0 [:arrow_down:](../../releases/latest/download/ml_drs.dll)| ✔ Yes | | [Desktop Reticle Switch](/ml_drs/README.md)| ml_drs | 1.0.1 [:arrow_down:](../../releases/latest/download/ml_drs.dll)| ✔ Yes<br>:hourglass_flowing_sand: Update review |
| [Extended Game Notifications](/ml_egn/README.md) | ml_egn | 1.0.2 [:arrow_down:](../../releases/latest/download/ml_egn.dll)| ✔ Yes | | [Extended Game Notifications](/ml_egn/README.md) | ml_egn | 1.0.3 [:arrow_down:](../../releases/latest/download/ml_egn.dll)| ✔ Yes<br>:hourglass_flowing_sand: Update review |
| [Leap Motion Extension](/ml_lme/README.md)| ml_lme | 1.3.9 [:arrow_down:](../../releases/latest/download/ml_lme.dll)| ✔ Yes<br>:hourglass_flowing_sand: Update review | | [Leap Motion Extension](/ml_lme/README.md)| ml_lme | 1.4.0 [:arrow_down:](../../releases/latest/download/ml_lme.dll)| ✔ Yes<br>:hourglass_flowing_sand: Update review |
| [Pickup Arm Movement](/ml_pam/README.md)| ml_pam | 1.0.5 [:arrow_down:](../../releases/latest/download/ml_pam.dll)| ✔ Yes | | [Pickup Arm Movement](/ml_pam/README.md)| ml_pam | 1.0.6 [:arrow_down:](../../releases/latest/download/ml_pam.dll)| ✔ Yes<br>:hourglass_flowing_sand: Update review |
| [Player Movement Copycat](/ml_pmc/README.md)| ml_pmc | 1.0.0 [:arrow_down:](../../releases/latest/download/ml_pmc.dll)| ✔ Yes | | [Player Movement Copycat](/ml_pmc/README.md)| ml_pmc | 1.0.1 [:arrow_down:](../../releases/latest/download/ml_pmc.dll)| ✔ Yes<br>:hourglass_flowing_sand: Update review |
| [Player Ragdoll Mod](/ml_prm/README.md)| ml_prm | 1.0.5 [:arrow_down:](../../releases/latest/download/ml_prm.dll)| ✔ Yes | | [Player Ragdoll Mod](/ml_prm/README.md)| ml_prm | 1.0.6 [:arrow_down:](../../releases/latest/download/ml_prm.dll)| ✔ Yes<br>:hourglass_flowing_sand: Update review |
**Archived mods:** **Archived mods:**
| Full name | Short name | Notes | | Full name | Short name | Notes |

View file

@ -1,57 +0,0 @@
using ABI.CCK.Components;
using ABI_RC.Core.Player;
using ABI_RC.Systems.IK.SubSystems;
using System.Reflection;
namespace ml_amt.Fixes
{
static class FBTDetectionFix
{
static readonly MethodInfo[] ms_fbtDetouredMethods =
{
typeof(PlayerSetup).GetMethod("Update", BindingFlags.NonPublic | BindingFlags.Instance),
typeof(PlayerSetup).GetMethod("FixedUpdate", BindingFlags.NonPublic | BindingFlags.Instance),
typeof(PlayerSetup).GetMethod("UpdatePlayerAvatarMovementData", BindingFlags.NonPublic | BindingFlags.Instance),
typeof(CVRParameterStreamEntry).GetMethod(nameof(CVRParameterStreamEntry.CheckUpdate))
};
static bool ms_fbtDetour = false;
internal static void Init(HarmonyLib.Harmony p_instance)
{
// FBT detour
p_instance.Patch(
typeof(BodySystem).GetMethod(nameof(BodySystem.FBTAvailable)),
new HarmonyLib.HarmonyMethod(typeof(FBTDetectionFix).GetMethod(nameof(OnFBTAvailable_Prefix), BindingFlags.Static | BindingFlags.NonPublic)),
null
);
foreach(MethodInfo l_detoured in ms_fbtDetouredMethods)
{
p_instance.Patch(
l_detoured,
new HarmonyLib.HarmonyMethod(typeof(FBTDetectionFix).GetMethod(nameof(FBTDetour_Prefix), BindingFlags.Static | BindingFlags.NonPublic)),
new HarmonyLib.HarmonyMethod(typeof(FBTDetectionFix).GetMethod(nameof(FBTDetour_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
);
}
}
// FBT detection override
static void FBTDetour_Prefix()
{
ms_fbtDetour = true;
}
static void FBTDetour_Postfix()
{
ms_fbtDetour = false;
}
static bool OnFBTAvailable_Prefix(ref bool __result)
{
if(ms_fbtDetour && !BodySystem.isCalibratedAsFullBody)
{
__result = false;
return false;
}
return true;
}
}
}

View file

@ -1,123 +0,0 @@
using ABI_RC.Core.Player;
using ABI_RC.Systems.MovementSystem;
using System;
using System.Reflection;
using UnityEngine;
namespace ml_amt.Fixes
{
static class PlayerColliderFix
{
static FieldInfo ms_initialAvatarHeight = typeof(PlayerSetup).GetField("_initialAvatarHeight", BindingFlags.NonPublic | BindingFlags.Instance);
static FieldInfo ms_avatarHeight = typeof(PlayerSetup).GetField("_avatarHeight", BindingFlags.NonPublic | BindingFlags.Instance);
internal static void Init(HarmonyLib.Harmony p_instance)
{
// Alternative collider height and radius
p_instance.Patch(
typeof(MovementSystem).GetMethod("UpdateCollider", BindingFlags.NonPublic | BindingFlags.Instance),
new HarmonyLib.HarmonyMethod(typeof(PlayerColliderFix).GetMethod(nameof(OnUpdateCollider_Prefix), BindingFlags.Static | BindingFlags.NonPublic)),
null
);
p_instance.Patch(
typeof(PlayerSetup).GetMethod("SetupIKScaling", BindingFlags.NonPublic | BindingFlags.Instance),
null,
new HarmonyLib.HarmonyMethod(typeof(PlayerColliderFix).GetMethod(nameof(OnSetupIKScaling_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
);
Settings.CollisionScaleChange += OnCollisionScaleChange;
}
// Alternative collider size
static bool OnUpdateCollider_Prefix(
ref MovementSystem __instance,
bool __0, // updateRadius
CharacterController ___controller,
float ____avatarHeight,
float ____avatarHeightFactor,
float ____minimumColliderRadius,
Vector3 ____colliderCenter
)
{
if(!Settings.CollisionScale)
return true;
try
{
if(___controller != null)
{
float l_scaledHeight = ____avatarHeight * ____avatarHeightFactor;
float l_newRadius = (__0 ? Mathf.Max(____minimumColliderRadius, l_scaledHeight / 6f) : ___controller.radius);
float l_newHeight = Mathf.Max(l_scaledHeight, l_newRadius * 2f);
float l_currentHeight = ___controller.height;
Vector3 l_newCenter = ____colliderCenter;
l_newCenter.y = (l_newHeight + 0.075f) * 0.5f; // Idk where 0.075f has come from
Vector3 l_currentCenter = ___controller.center;
if(__0 || (Mathf.Abs(l_currentHeight - l_newHeight) > (l_currentHeight * 0.05f)) || (Vector3.Distance(l_currentCenter, l_newCenter) > (l_currentHeight * 0.05f)))
{
if(__0)
___controller.radius = l_newRadius;
___controller.height = l_newHeight;
___controller.center = l_newCenter;
__instance.groundDistance = l_newRadius;
if(__instance.proxyCollider != null)
{
if(__0)
__instance.proxyCollider.radius = l_newRadius;
__instance.proxyCollider.height = l_newHeight;
__instance.proxyCollider.center = new Vector3(0f, l_newCenter.y, 0f);
}
if(__instance.forceObject != null)
__instance.forceObject.transform.localScale = new Vector3(l_newRadius + 0.1f, l_newHeight, l_newRadius + 0.1f);
if(__instance.groundCheck != null)
__instance.groundCheck.localPosition = ____colliderCenter;
}
}
}
catch(Exception l_exception)
{
MelonLoader.MelonLogger.Error(l_exception);
}
return false;
}
static void OnSetupIKScaling_Postfix(
ref PlayerSetup __instance,
float ____avatarHeight
)
{
if(!Settings.CollisionScale)
return;
try
{
__instance._movementSystem.UpdateAvatarHeight(Mathf.Clamp(____avatarHeight, 0.05f, float.MaxValue), true);
}
catch(Exception l_exception)
{
MelonLoader.MelonLogger.Error(l_exception);
}
}
static void OnCollisionScaleChange(bool p_state)
{
try
{
if(p_state)
MovementSystem.Instance.UpdateAvatarHeight((float)ms_avatarHeight.GetValue(PlayerSetup.Instance), true);
else
MovementSystem.Instance.UpdateAvatarHeight((float)ms_initialAvatarHeight.GetValue(PlayerSetup.Instance), true);
}
catch(Exception l_exception)
{
MelonLoader.MelonLogger.Error(l_exception);
}
}
}
}

View file

@ -35,17 +35,9 @@ namespace ml_amt
null, null,
new HarmonyLib.HarmonyMethod(typeof(AvatarMotionTweaker).GetMethod(nameof(OnCalibrate_Postfix), BindingFlags.Static | BindingFlags.NonPublic)) new HarmonyLib.HarmonyMethod(typeof(AvatarMotionTweaker).GetMethod(nameof(OnCalibrate_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
); );
HarmonyInstance.Patch(
typeof(PlayerSetup).GetMethod("SetPlaySpaceScale", BindingFlags.NonPublic | BindingFlags.Instance),
null,
new HarmonyLib.HarmonyMethod(typeof(AvatarMotionTweaker).GetMethod(nameof(OnPlayspaceScale_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
);
// Fixes // Fixes
Fixes.AnimatorOverrideControllerFix.Init(HarmonyInstance); Fixes.AnimatorOverrideControllerFix.Init(HarmonyInstance);
Fixes.FBTDetectionFix.Init(HarmonyInstance);
Fixes.PlayerColliderFix.Init(HarmonyInstance);
Fixes.MovementJumpFix.Init(HarmonyInstance); Fixes.MovementJumpFix.Init(HarmonyInstance);
ModSupporter.Init(); ModSupporter.Init();
@ -58,12 +50,8 @@ namespace ml_amt
yield return null; yield return null;
m_localTweaker = PlayerSetup.Instance.gameObject.AddComponent<MotionTweaker>(); m_localTweaker = PlayerSetup.Instance.gameObject.AddComponent<MotionTweaker>();
m_localTweaker.SetIKOverrideCrouch(Settings.IKOverrideCrouch);
m_localTweaker.SetCrouchLimit(Settings.CrouchLimit); m_localTweaker.SetCrouchLimit(Settings.CrouchLimit);
m_localTweaker.SetIKOverrideProne(Settings.IKOverrideProne);
m_localTweaker.SetProneLimit(Settings.ProneLimit); m_localTweaker.SetProneLimit(Settings.ProneLimit);
m_localTweaker.SetPoseTransitions(Settings.PoseTransitions);
m_localTweaker.SetAdjustedMovement(Settings.AdjustedMovement);
m_localTweaker.SetIKOverrideFly(Settings.IKOverrideFly); m_localTweaker.SetIKOverrideFly(Settings.IKOverrideFly);
m_localTweaker.SetIKOverrideJump(Settings.IKOverrideJump); m_localTweaker.SetIKOverrideJump(Settings.IKOverrideJump);
m_localTweaker.SetDetectEmotes(Settings.DetectEmotes); m_localTweaker.SetDetectEmotes(Settings.DetectEmotes);
@ -119,19 +107,5 @@ namespace ml_amt
MelonLoader.MelonLogger.Error(l_exception); MelonLoader.MelonLogger.Error(l_exception);
} }
} }
static void OnPlayspaceScale_Postfix() => ms_instance?.OnPlayspaceScale();
void OnPlayspaceScale()
{
try
{
if(m_localTweaker != null)
m_localTweaker.OnPlayspaceScale();
}
catch(Exception l_exception)
{
MelonLoader.MelonLogger.Error(l_exception);
}
}
} }
} }

View file

@ -12,49 +12,32 @@ namespace ml_amt
[DisallowMultipleComponent] [DisallowMultipleComponent]
class MotionTweaker : MonoBehaviour class MotionTweaker : MonoBehaviour
{ {
struct IKState
{
public float m_weight;
public float m_locomotionWeight;
public bool m_plantFeet;
public bool m_bendNormalLeft;
public bool m_bendNormalRight;
}
static readonly Vector4 ms_pointVector = new Vector4(0f, 0f, 0f, 1f); static readonly Vector4 ms_pointVector = new Vector4(0f, 0f, 0f, 1f);
static readonly int ms_emoteHash = Animator.StringToHash("Emote"); static readonly int ms_emoteHash = Animator.StringToHash("Emote");
enum PoseState IKState m_ikState;
{
Standing = 0,
Crouching,
Proning
}
VRIK m_vrIk = null; VRIK m_vrIk = null;
int m_locomotionLayer = 0; int m_locomotionLayer = 0;
float m_ikWeight = 1f; // Original weight float m_avatarScale = 1f;
float m_locomotionWeight = 1f; // Original weight
bool m_plantFeet = false; // Original plant feet
float m_avatarScale = 1f; // Instantiated scale
Vector3 m_locomotionOffset = Vector3.zero; // Original locomotion offset Vector3 m_locomotionOffset = Vector3.zero; // Original locomotion offset
bool m_bendNormalLeft = false;
bool m_bendNormalRight = false;
Transform m_avatarHips = null; Transform m_avatarHips = null;
float m_avatarHeight = 1f; // Initial avatar view height
bool m_inVR = false; bool m_inVR = false;
bool m_fbtAnimations = true;
bool m_avatarReady = false; bool m_avatarReady = false;
bool m_compatibleAvatar = false;
float m_upright = 1f;
PoseState m_poseState = PoseState.Standing;
bool m_grounded = false; bool m_grounded = false;
bool m_groundedRaw = false; bool m_groundedRaw = false;
bool m_moving = false; bool m_moving = false;
bool m_locomotionOverride = false; bool m_locomotionOverride = false;
bool m_ikOverrideCrouch = true;
float m_crouchLimit = 0.65f;
bool m_customCrouchLimit = false;
bool m_ikOverrideProne = true;
float m_proneLimit = 0.3f;
bool m_customProneLimit = false;
bool m_poseTransitions = true;
bool m_adjustedMovement = true;
bool m_ikOverrideFly = true; bool m_ikOverrideFly = true;
bool m_ikOverrideJump = true; bool m_ikOverrideJump = true;
@ -64,7 +47,6 @@ namespace ml_amt
bool m_followHips = true; bool m_followHips = true;
Vector3 m_hipsToPlayer = Vector3.zero; Vector3 m_hipsToPlayer = Vector3.zero;
Vector2 m_stepDistance = Vector2.zero;
Vector3 m_massCenter = Vector3.zero; Vector3 m_massCenter = Vector3.zero;
readonly List<AvatarParameter> m_parameters = null; readonly List<AvatarParameter> m_parameters = null;
@ -79,38 +61,27 @@ namespace ml_amt
{ {
m_inVR = Utils.IsInVR(); m_inVR = Utils.IsInVR();
Settings.IKOverrideCrouchChange += this.SetIKOverrideCrouch;
Settings.CrouchLimitChange += this.SetCrouchLimit; Settings.CrouchLimitChange += this.SetCrouchLimit;
Settings.IKOverrideProneChange += this.SetIKOverrideProne;
Settings.ProneLimitChange += this.SetProneLimit; Settings.ProneLimitChange += this.SetProneLimit;
Settings.PoseTransitionsChange += this.SetPoseTransitions;
Settings.AdjustedMovementChange += this.SetAdjustedMovement;
Settings.IKOverrideFlyChange += this.SetIKOverrideFly; Settings.IKOverrideFlyChange += this.SetIKOverrideFly;
Settings.IKOverrideJumpChange += this.SetIKOverrideJump; Settings.IKOverrideJumpChange += this.SetIKOverrideJump;
Settings.DetectEmotesChange += this.SetDetectEmotes; Settings.DetectEmotesChange += this.SetDetectEmotes;
Settings.FollowHipsChange += this.SetFollowHips; Settings.FollowHipsChange += this.SetFollowHips;
Settings.MassCenterChange += this.OnMassCenterChange; Settings.MassCenterChange += this.OnMassCenterChange;
Settings.ScaledStepsChange += this.OnScaledStepsChange;
m_fbtAnimations = MetaPort.Instance.settings.GetSettingsBool("GeneralEnableRunningAnimationFullBody"); SetCrouchLimit(Settings.CrouchLimit);
MetaPort.Instance.settings.settingBoolChanged.AddListener(this.OnGameSettingBoolChange); SetProneLimit(Settings.ProneLimit);
} }
void OnDestroy() void OnDestroy()
{ {
Settings.IKOverrideCrouchChange -= this.SetIKOverrideCrouch;
Settings.CrouchLimitChange -= this.SetCrouchLimit; Settings.CrouchLimitChange -= this.SetCrouchLimit;
Settings.IKOverrideProneChange -= this.SetIKOverrideProne;
Settings.ProneLimitChange -= this.SetProneLimit; Settings.ProneLimitChange -= this.SetProneLimit;
Settings.PoseTransitionsChange -= this.SetPoseTransitions;
Settings.AdjustedMovementChange -= this.SetAdjustedMovement;
Settings.IKOverrideFlyChange -= this.SetIKOverrideFly; Settings.IKOverrideFlyChange -= this.SetIKOverrideFly;
Settings.IKOverrideJumpChange -= this.SetIKOverrideJump; Settings.IKOverrideJumpChange -= this.SetIKOverrideJump;
Settings.DetectEmotesChange -= this.SetDetectEmotes; Settings.DetectEmotesChange -= this.SetDetectEmotes;
Settings.FollowHipsChange -= this.SetFollowHips; Settings.FollowHipsChange -= this.SetFollowHips;
Settings.MassCenterChange -= this.OnMassCenterChange; Settings.MassCenterChange -= this.OnMassCenterChange;
MetaPort.Instance.settings.settingBoolChanged.RemoveListener(this.OnGameSettingBoolChange);
} }
void Update() void Update()
@ -121,40 +92,12 @@ namespace ml_amt
m_groundedRaw = MovementSystem.Instance.IsGroundedRaw(); m_groundedRaw = MovementSystem.Instance.IsGroundedRaw();
m_moving = !Mathf.Approximately(MovementSystem.Instance.movementVector.magnitude, 0f); m_moving = !Mathf.Approximately(MovementSystem.Instance.movementVector.magnitude, 0f);
// Update upright
Matrix4x4 l_hmdMatrix = PlayerSetup.Instance.transform.GetMatrix().inverse * PlayerSetup.Instance.GetActiveCamera().transform.GetMatrix();
float l_currentHeight = Mathf.Clamp((l_hmdMatrix * ms_pointVector).y, 0f, float.MaxValue);
float l_avatarViewHeight = Mathf.Clamp(m_avatarHeight * GetRelativeScale(), 0f, float.MaxValue);
m_upright = Mathf.Clamp01((l_avatarViewHeight > 0f) ? (l_currentHeight / l_avatarViewHeight) : 0f);
m_poseState = (m_upright <= Mathf.Min(m_proneLimit, m_crouchLimit)) ? PoseState.Proning : ((m_upright <= Mathf.Max(m_proneLimit, m_crouchLimit)) ? PoseState.Crouching : PoseState.Standing);
if(m_avatarHips != null) if(m_avatarHips != null)
{ {
Vector4 l_hipsToPoint = (PlayerSetup.Instance.transform.GetMatrix().inverse * m_avatarHips.GetMatrix()) * ms_pointVector; Vector4 l_hipsToPoint = (PlayerSetup.Instance.transform.GetMatrix().inverse * m_avatarHips.GetMatrix()) * ms_pointVector;
m_hipsToPlayer.Set(l_hipsToPoint.x, 0f, l_hipsToPoint.z); m_hipsToPlayer.Set(l_hipsToPoint.x, 0f, l_hipsToPoint.z);
} }
if(m_inVR && (m_vrIk != null) && m_vrIk.enabled)
{
if(m_adjustedMovement)
{
MovementSystem.Instance.ChangeCrouch(m_poseState == PoseState.Crouching);
MovementSystem.Instance.ChangeProne(m_poseState == PoseState.Proning);
if(!m_poseTransitions)
{
PlayerSetup.Instance.animatorManager.SetAnimatorParameterBool("Crouching", false);
PlayerSetup.Instance.animatorManager.SetAnimatorParameterBool("Prone", false);
}
}
if(m_poseTransitions)
{
PlayerSetup.Instance.animatorManager.SetAnimatorParameterBool("Crouching", (m_poseState == PoseState.Crouching) && !m_compatibleAvatar && (!BodySystem.isCalibratedAsFullBody || m_fbtAnimations));
PlayerSetup.Instance.animatorManager.SetAnimatorParameterBool("Prone", (m_poseState == PoseState.Proning) && !m_compatibleAvatar && (!BodySystem.isCalibratedAsFullBody || m_fbtAnimations));
}
}
m_emoteActive = false; m_emoteActive = false;
if(m_detectEmotes && (m_locomotionLayer >= 0)) if(m_detectEmotes && (m_locomotionLayer >= 0))
{ {
@ -178,10 +121,6 @@ namespace ml_amt
m_grounded = false; m_grounded = false;
m_groundedRaw = false; m_groundedRaw = false;
m_avatarReady = false; m_avatarReady = false;
m_compatibleAvatar = false;
m_poseState = PoseState.Standing;
m_customCrouchLimit = false;
m_customProneLimit = false;
m_avatarScale = 1f; m_avatarScale = 1f;
m_locomotionOffset = Vector3.zero; m_locomotionOffset = Vector3.zero;
m_emoteActive = false; m_emoteActive = false;
@ -189,9 +128,7 @@ namespace ml_amt
m_locomotionOverride = false; m_locomotionOverride = false;
m_hipsToPlayer = Vector3.zero; m_hipsToPlayer = Vector3.zero;
m_avatarHips = null; m_avatarHips = null;
m_avatarHeight = 1f;
m_massCenter = Vector3.zero; m_massCenter = Vector3.zero;
m_stepDistance = Vector2.zero;
m_parameters.Clear(); m_parameters.Clear();
} }
@ -201,7 +138,7 @@ namespace ml_amt
m_vrIk = PlayerSetup.Instance._avatar.GetComponent<VRIK>(); m_vrIk = PlayerSetup.Instance._avatar.GetComponent<VRIK>();
m_locomotionLayer = PlayerSetup.Instance._animator.GetLayerIndex("Locomotion/Emotes"); m_locomotionLayer = PlayerSetup.Instance._animator.GetLayerIndex("Locomotion/Emotes");
m_avatarHips = PlayerSetup.Instance._animator.GetBoneTransform(HumanBodyBones.Hips); m_avatarHips = PlayerSetup.Instance._animator.GetBoneTransform(HumanBodyBones.Hips);
m_avatarHeight = PlayerSetup.Instance._avatar.GetComponent<ABI.CCK.Components.CVRAvatar>().viewPosition.y; m_avatarScale = Mathf.Abs(PlayerSetup.Instance._avatar.transform.localScale.y);
// Parse animator parameters // Parse animator parameters
m_parameters.Add(new AvatarParameter(AvatarParameter.ParameterType.Upright, PlayerSetup.Instance.animatorManager)); m_parameters.Add(new AvatarParameter(AvatarParameter.ParameterType.Upright, PlayerSetup.Instance.animatorManager));
@ -209,17 +146,6 @@ namespace ml_amt
m_parameters.Add(new AvatarParameter(AvatarParameter.ParameterType.Moving, PlayerSetup.Instance.animatorManager)); m_parameters.Add(new AvatarParameter(AvatarParameter.ParameterType.Moving, PlayerSetup.Instance.animatorManager));
m_parameters.RemoveAll(p => !p.IsValid()); m_parameters.RemoveAll(p => !p.IsValid());
m_compatibleAvatar = m_parameters.Exists(p => (p.GetParameterType() == AvatarParameter.ParameterType.Upright));
m_avatarScale = Mathf.Abs(PlayerSetup.Instance._avatar.transform.localScale.y);
Transform l_customTransform = PlayerSetup.Instance._avatar.transform.Find("CrouchLimit");
m_customCrouchLimit = (l_customTransform != null);
m_crouchLimit = m_customCrouchLimit ? Mathf.Clamp01(l_customTransform.localPosition.y) : Settings.CrouchLimit;
l_customTransform = PlayerSetup.Instance._avatar.transform.Find("ProneLimit");
m_customProneLimit = (l_customTransform != null);
m_proneLimit = m_customProneLimit ? Mathf.Clamp01(l_customTransform.localPosition.y) : Settings.ProneLimit;
// Apply VRIK tweaks // Apply VRIK tweaks
if(m_vrIk != null) if(m_vrIk != null)
{ {
@ -246,8 +172,6 @@ namespace ml_amt
m_vrIk.solver.locomotion.offset = (Settings.MassCenter ? m_massCenter : m_locomotionOffset); m_vrIk.solver.locomotion.offset = (Settings.MassCenter ? m_massCenter : m_locomotionOffset);
m_stepDistance.Set(m_vrIk.solver.locomotion.stepThreshold, m_vrIk.solver.locomotion.footDistance);
m_vrIk.onPreSolverUpdate.AddListener(this.OnIKPreUpdate); m_vrIk.onPreSolverUpdate.AddListener(this.OnIKPreUpdate);
m_vrIk.onPostSolverUpdate.AddListener(this.OnIKPostUpdate); m_vrIk.onPostSolverUpdate.AddListener(this.OnIKPostUpdate);
} }
@ -257,33 +181,21 @@ namespace ml_amt
internal void OnCalibrate() internal void OnCalibrate()
{ {
if(m_avatarReady && BodySystem.isCalibratedAsFullBody && BodySystem.enableHipTracking && !BodySystem.enableRightFootTracking && !BodySystem.enableLeftFootTracking && !BodySystem.enableLeftKneeTracking && !BodySystem.enableRightKneeTracking) if(m_avatarReady && (m_vrIk != null) && (m_vrIk.solver.spine.pelvisTarget != null) && (m_vrIk.solver.leftLeg.target == null) && (m_vrIk.solver.rightLeg.target == null))
{ {
// Do not consider 4PT as FBT (!!!)
m_vrIk.solver.spine.bodyPosStiffness = 0.55f;
m_vrIk.solver.spine.bodyRotStiffness = 0.1f;
m_vrIk.solver.spine.neckStiffness = 0.5f;
m_vrIk.solver.spine.chestClampWeight = 0.55f;
m_vrIk.solver.spine.moveBodyBackWhenCrouching = 0.5f;
m_vrIk.solver.spine.maxRootAngle = 25f;
m_vrIk.fixTransforms = false;
BodySystem.isCalibratedAsFullBody = false; BodySystem.isCalibratedAsFullBody = false;
BodySystem.TrackingLeftLegEnabled = false; BodySystem.TrackingLeftLegEnabled = false;
BodySystem.TrackingRightLegEnabled = false; BodySystem.TrackingRightLegEnabled = false;
BodySystem.TrackingLocomotionEnabled = true; BodySystem.TrackingLocomotionEnabled = true;
if(m_vrIk != null)
m_vrIk.solver.spine.maxRootAngle = 25f; // I need to rotate my legs, ffs!
}
}
internal void OnPlayspaceScale()
{
if(m_vrIk != null)
{
if(Settings.MassCenter)
m_vrIk.solver.locomotion.offset = m_massCenter * GetRelativeScale();
if(Settings.ScaledSteps)
{
m_vrIk.solver.locomotion.stepThreshold = m_stepDistance.x * GetRelativeScale();
m_vrIk.solver.locomotion.footDistance = m_stepDistance.y * GetRelativeScale();
m_vrIk.solver.locomotion.stepHeight.keys = Utils.GetSineKeyframes(Mathf.Clamp01(PlayerSetup.Instance.GetAvatarHeight()) * 0.03f);
m_vrIk.solver.locomotion.heelHeight.keys = Utils.GetSineKeyframes(Mathf.Clamp01(PlayerSetup.Instance.GetAvatarHeight()) * 0.03f);
}
} }
} }
@ -292,24 +204,24 @@ namespace ml_amt
{ {
bool l_locomotionOverride = false; bool l_locomotionOverride = false;
m_ikWeight = m_vrIk.solver.IKPositionWeight; m_ikState.m_weight = m_vrIk.solver.IKPositionWeight;
m_locomotionWeight = m_vrIk.solver.locomotion.weight; m_ikState.m_locomotionWeight = m_vrIk.solver.locomotion.weight;
m_plantFeet = m_vrIk.solver.plantFeet; m_ikState.m_plantFeet = m_vrIk.solver.plantFeet;
m_bendNormalLeft = m_vrIk.solver.leftLeg.useAnimatedBendNormal; m_ikState.m_bendNormalLeft = m_vrIk.solver.leftLeg.useAnimatedBendNormal;
m_bendNormalRight = m_vrIk.solver.rightLeg.useAnimatedBendNormal; m_ikState.m_bendNormalRight = m_vrIk.solver.rightLeg.useAnimatedBendNormal;
if(m_detectEmotes && m_emoteActive) if(m_detectEmotes && m_emoteActive)
m_vrIk.solver.IKPositionWeight = 0f; m_vrIk.solver.IKPositionWeight = 0f;
if(!BodySystem.isCalibratedAsFullBody) if(!BodySystem.isCalibratedAsFullBody)
{ {
if((m_ikOverrideCrouch && (m_poseState != PoseState.Standing)) || (m_ikOverrideProne && (m_poseState == PoseState.Proning))) if(PlayerSetup.Instance.avatarUpright <= PlayerSetup.Instance.avatarCrouchLimit)
{ {
m_vrIk.solver.locomotion.weight = 0f;
m_vrIk.solver.leftLeg.useAnimatedBendNormal = true; m_vrIk.solver.leftLeg.useAnimatedBendNormal = true;
m_vrIk.solver.rightLeg.useAnimatedBendNormal = true; m_vrIk.solver.rightLeg.useAnimatedBendNormal = true;
l_locomotionOverride = true; l_locomotionOverride = true;
} }
if(m_ikOverrideFly && MovementSystem.Instance.flying) if(m_ikOverrideFly && MovementSystem.Instance.flying)
{ {
m_vrIk.solver.locomotion.weight = 0f; m_vrIk.solver.locomotion.weight = 0f;
@ -327,7 +239,7 @@ namespace ml_amt
} }
bool l_solverActive = !Mathf.Approximately(m_vrIk.solver.IKPositionWeight, 0f); bool l_solverActive = !Mathf.Approximately(m_vrIk.solver.IKPositionWeight, 0f);
if(l_locomotionOverride && l_solverActive && m_followHips && (!m_moving || (m_poseState == PoseState.Proning)) && m_inVR && !BodySystem.isCalibratedAsFullBody && !ModSupporter.SkipHipsOverride()) if(l_locomotionOverride && l_solverActive && m_followHips && (!m_moving || (PlayerSetup.Instance.avatarUpright <= PlayerSetup.Instance.avatarProneLimit)) && m_inVR && !BodySystem.isCalibratedAsFullBody && !ModSupporter.SkipHipsOverride())
{ {
m_vrIk.solver.plantFeet = false; m_vrIk.solver.plantFeet = false;
IKSystem.VrikRootController.enabled = false; IKSystem.VrikRootController.enabled = false;
@ -341,51 +253,21 @@ namespace ml_amt
void OnIKPostUpdate() void OnIKPostUpdate()
{ {
m_vrIk.solver.IKPositionWeight = m_ikWeight; m_vrIk.solver.IKPositionWeight = m_ikState.m_weight;
m_vrIk.solver.locomotion.weight = m_locomotionWeight; m_vrIk.solver.locomotion.weight = m_ikState.m_locomotionWeight;
m_vrIk.solver.plantFeet = m_plantFeet; m_vrIk.solver.plantFeet = m_ikState.m_plantFeet;
m_vrIk.solver.leftLeg.useAnimatedBendNormal = m_bendNormalLeft; m_vrIk.solver.leftLeg.useAnimatedBendNormal = m_ikState.m_bendNormalLeft;
m_vrIk.solver.rightLeg.useAnimatedBendNormal = m_bendNormalRight; m_vrIk.solver.rightLeg.useAnimatedBendNormal = m_ikState.m_bendNormalRight;
} }
// Settings // Settings
internal void SetIKOverrideCrouch(bool p_state)
{
m_ikOverrideCrouch = p_state;
}
internal void SetCrouchLimit(float p_value) internal void SetCrouchLimit(float p_value)
{ {
if(!m_customCrouchLimit) PlayerSetup.Instance.avatarCrouchLimit = Mathf.Max(Mathf.Clamp01(p_value), PlayerSetup.Instance.avatarProneLimit);
m_crouchLimit = Mathf.Clamp01(p_value);
}
internal void SetIKOverrideProne(bool p_state)
{
m_ikOverrideProne = p_state;
} }
internal void SetProneLimit(float p_value) internal void SetProneLimit(float p_value)
{ {
if(!m_customProneLimit) PlayerSetup.Instance.avatarProneLimit = Mathf.Min(Mathf.Clamp01(p_value), PlayerSetup.Instance.avatarCrouchLimit);
m_proneLimit = Mathf.Clamp01(p_value);
}
internal void SetPoseTransitions(bool p_state)
{
m_poseTransitions = p_state;
if(!m_poseTransitions && m_avatarReady && m_inVR)
{
PlayerSetup.Instance.animatorManager.SetAnimatorParameterBool("Crouching", false);
PlayerSetup.Instance.animatorManager.SetAnimatorParameterBool("Prone", false);
}
}
internal void SetAdjustedMovement(bool p_state)
{
m_adjustedMovement = p_state;
if(!m_adjustedMovement && m_avatarReady && m_inVR)
{
MovementSystem.Instance.ChangeCrouch(false);
MovementSystem.Instance.ChangeProne(false);
}
} }
internal void SetIKOverrideFly(bool p_state) internal void SetIKOverrideFly(bool p_state)
{ {
@ -408,32 +290,6 @@ namespace ml_amt
if(m_vrIk != null) if(m_vrIk != null)
m_vrIk.solver.locomotion.offset = (Settings.MassCenter ? (m_massCenter * GetRelativeScale()) : m_locomotionOffset); m_vrIk.solver.locomotion.offset = (Settings.MassCenter ? (m_massCenter * GetRelativeScale()) : m_locomotionOffset);
} }
void OnScaledStepsChange(bool p_state)
{
if(m_vrIk != null)
{
if(p_state)
{
m_vrIk.solver.locomotion.stepThreshold = m_stepDistance.x * GetRelativeScale();
m_vrIk.solver.locomotion.footDistance = m_stepDistance.y * GetRelativeScale();
m_vrIk.solver.locomotion.stepHeight.keys = Utils.GetSineKeyframes(Mathf.Clamp01(PlayerSetup.Instance.GetAvatarHeight()) * 0.03f);
m_vrIk.solver.locomotion.heelHeight.keys = Utils.GetSineKeyframes(Mathf.Clamp01(PlayerSetup.Instance.GetAvatarHeight()) * 0.03f);
}
else
{
IKSystem.Instance.ApplyAvatarScaleToIk(PlayerSetup.Instance.GetAvatarHeight());
m_vrIk.solver.locomotion.stepHeight.keys = Utils.GetSineKeyframes(0.03f);
m_vrIk.solver.locomotion.heelHeight.keys = Utils.GetSineKeyframes(0.03f);
}
}
}
// Game settings
void OnGameSettingBoolChange(string p_name, bool p_state)
{
if(p_name == "GeneralEnableRunningAnimationFullBody")
m_fbtAnimations = p_state;
}
// Arbitrary // Arbitrary
float GetRelativeScale() float GetRelativeScale()
@ -442,7 +298,7 @@ namespace ml_amt
} }
// Parameters access // Parameters access
public float GetUpright() => m_upright; public float GetUpright() => PlayerSetup.Instance.avatarUpright;
public bool GetGroundedRaw() => m_groundedRaw; public bool GetGroundedRaw() => m_groundedRaw;
public bool GetMoving() => m_moving; public bool GetMoving() => m_moving;
} }

View file

@ -1,10 +1,6 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyTitle("AvatarMotionTweaker")] [assembly: MelonLoader.MelonInfo(typeof(ml_amt.AvatarMotionTweaker), "AvatarMotionTweaker", "1.2.9", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: AssemblyVersion("1.2.8")]
[assembly: AssemblyFileVersion("1.2.8")]
[assembly: MelonLoader.MelonInfo(typeof(ml_amt.AvatarMotionTweaker), "AvatarMotionTweaker", "1.2.8", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: MelonLoader.MelonGame(null, "ChilloutVR")] [assembly: MelonLoader.MelonGame(null, "ChilloutVR")]
[assembly: MelonLoader.MelonOptionalDependencies("ml_prm", "ml_pmc")] [assembly: MelonLoader.MelonOptionalDependencies("ml_prm", "ml_pmc")]
[assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] [assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]

View file

@ -10,45 +10,34 @@ This mod adds features for AAS animator and avatar locomotion behaviour.
# Usage # Usage
Available mod's settings in `Settings - IK - Avatar Motion Tweaker`: Available mod's settings in `Settings - IK - Avatar Motion Tweaker`:
* **IK override while crouching:** disables legs locomotion/autostep upon HMD reaching `Crouch limit`; default value - `true`. * **Crouch limit:** defines crouch limit; default value - `75`.
* **Crouch limit:** defines crouch limit; default value - `65`. * **Prone limit:** defines prone limit; default value - `40`.
* Note: Can be overrided by avatar. For this avatar has to have child gameobject with name `CrouchLimit`, its Y-axis location will be used as limit, should be in range [0.0, 1.0].
* **IK override while proning:** disables legs locomotion/autostep upon HMD reaching `Prone limit`; default value - `true`.
* **Prone limit:** defines prone limit; default value - `30`.
* Note: Can be overrided by avatar. For this avatar has to have child gameobject with name `ProneLimit`, its Y-axis location will be used as limit, should be in range [0.0, 1.0].
* **IK override while flying:** disables legs locomotion/autostep in fly mode; default value - `true`. * **IK override while flying:** disables legs locomotion/autostep in fly mode; default value - `true`.
* **IK override while jumping:** disables legs locomotion/autostep in jump; default value - `true`. * **IK override while jumping:** disables legs locomotion/autostep in jump; default value - `true`.
* **Follow hips on IK override:** adjusts avatar position to overcome animation snapping on IK override; default value - `true`. * **Follow hips on IK override:** adjusts avatar position to overcome animation snapping on IK override; default value - `true`.
* Note: Works best with animations that have root transform position (XZ) based on center of mass. * Note: Works best with animations that have root transform position (XZ) based on center of mass.
* Note: Made for four point tracking (head, hands, hips) in mind. * Note: Made for four point tracking (head, hands and hips) in mind.
* **Pose transitions:** allows regular avatars animator to transit in crouch/prone states; default value - `true`.
* Note: Avatar is considered as regular if its AAS animator doesn't have `Upright` parameter.
* **Adjusted pose movement speed:** scales movement speed upon crouching/proning; default value - `true`.
* **Detect animations emote tag:** disables avatar's IK entirely if current animator state has `Emote` tag; default value - `true`. * **Detect animations emote tag:** disables avatar's IK entirely if current animator state has `Emote` tag; default value - `true`.
* Note: Created as example for [propoused game feature](https://feedback.abinteractive.net/p/disabling-vr-ik-for-emotes-via-animator-state-tag-7b80d963-053a-41c0-86ac-e3d53c61c1e2). * Note: Created as example for [propoused game feature](https://feedback.abinteractive.net/p/disabling-vr-ik-for-emotes-via-animator-state-tag-7b80d963-053a-41c0-86ac-e3d53c61c1e2).
* **Adjusted locomotion mass center:** automatically changes IK locomotion center if avatar has toe bones; default value - `true`. * **Adjusted locomotion mass center:** automatically changes IK locomotion center if avatar has toe bones; default value - `true`.
* Note: Compatible with [DesktopVRIK](https://github.com/NotAKidOnSteam/DesktopVRIK) and [FuckToes](https://github.com/NotAKidOnSteam/FuckToes). * Note: Compatible with [DesktopVRIK](https://github.com/NotAKidOnSteam/DesktopVRIK) and [FuckToes](https://github.com/NotAKidOnSteam/FuckToes).
* **Scaled locomotion steps:** scales VRIK locomotion steps according to avatar height and scale; default value - `true`.
#### Fixes/overhauls options #### Fixes/overhauls options
* **Scaled locomotion jump:** scales locomotion jump according to relation between your player settings height and current avatar height (includes avatar scale); default value - `false`. * **Scaled locomotion jump:** scales locomotion jump according to relation between your player settings height and current avatar height (includes avatar scale); default value - `false`.
* Note: Disabled in worlds that don't allow flight. * Note: Disabled in worlds that don't allow flight.
* **Alternative avatar collider scale:** applies slightly different approach to avatar collider size change; default value - `true`.
* **Fix animation overrides (chairs, etc.):** fixes animations overriding for avatars with AAS; default value - `true`. * **Fix animation overrides (chairs, etc.):** fixes animations overriding for avatars with AAS; default value - `true`.
* Note: This option is made to address [broken animator in chairs and combat worlds issue](https://feedback.abinteractive.net/p/gestures-getting-stuck-locally-upon-entering-vehicles-chairs). * Note: This option is made to address [broken animator in chairs and combat worlds issue](https://feedback.abinteractive.net/p/gestures-getting-stuck-locally-upon-entering-vehicles-chairs).
Available additional parameters for AAS animator: Available additional parameters for AAS animator:
* **`Upright`:** defines linear coefficient between current viewpoint height and avatar's viewpoint height; float, range - [0.0, 1.0]. * **`Upright`:** defines linear coefficient between current viewpoint height and avatar's viewpoint height; float, range - [0.0, 1.0].
* Note: Can be set as local-only (not synced) if starts with `#` character. * Note: Can be set as local-only (not synced) if starts with `#` character.
* Note: Defining this parameter in AAS animator will consider avatar as compatible with mod. * Note: Shouldn't be used for transitions between poses in desktop mode. In desktop mode its value is driven by avatar animations. Use `CVR Parameter Stream` for detecting desktop/VR modes and change AAS animator transitions accordingly.
* Note: Can't be used for transitions between poses in desktop mode. In desktop mode its value is driven by avatar animations. Use `CVR Parameter Stream` for detecting desktop/VR modes and change AAS animator transitions accordingly.
* **`GroundedRaw`:** defines instant grounding state of player instead of delayed default parameter `Grounded`; boolean. * **`GroundedRaw`:** defines instant grounding state of player instead of delayed default parameter `Grounded`; boolean.
* Note: Can be set as local-only (not synced) if starts with `#` character. * Note: Can be set as local-only (not synced) if starts with `#` character.
* **`Moving`:** defines movement state of player; boolean. * **`Moving`:** defines movement state of player; boolean.
* Note: Can be set as local-only (not synced) if starts with `#` character. * Note: Can be set as local-only (not synced) if starts with `#` character.
Additional mod's behaviour: Additional mod's behaviour:
* Overrides and fixes IK behaviour in 4PT mode (head, hands, hips). Be sure to disable legs and knees tracking in `Settings - IK tab`. * Overrides and fixes IK behaviour in 4PT mode (head, hands and hips).
https://user-images.githubusercontent.com/4295751/233663668-adf5eaa6-8195-4fd2-90d5-78d61fe3fe58.mp4 # NOTE
This is testing update for game build r171, not ready for massive usage yet!
https://user-images.githubusercontent.com/4295751/233663726-80a05323-aed2-41fb-9b00-7d5024ebf247.mp4

View file

@ -9,56 +9,38 @@ namespace ml_amt
{ {
enum ModSetting enum ModSetting
{ {
IKOverrideCrouch = 0,
CrouchLimit, CrouchLimit,
IKOverrideProne,
ProneLimit, ProneLimit,
PoseTransitions,
AdjustedMovement,
IKOverrideFly, IKOverrideFly,
IKOverrideJump, IKOverrideJump,
DetectEmotes, DetectEmotes,
FollowHips, FollowHips,
CollisionScale,
ScaledSteps,
ScaledJump, ScaledJump,
MassCenter, MassCenter,
OverrideFix OverrideFix
}; };
public static bool IKOverrideCrouch { get; private set; } = true; public static float CrouchLimit { get; private set; } = 0.75f;
public static float CrouchLimit { get; private set; } = 0.65f; public static float ProneLimit { get; private set; } = 0.4f;
public static bool IKOverrideProne { get; private set; } = true;
public static float ProneLimit { get; private set; } = 0.3f;
public static bool PoseTransitions { get; private set; } = true;
public static bool AdjustedMovement { get; private set; } = true;
public static bool IKOverrideFly { get; private set; } = true; public static bool IKOverrideFly { get; private set; } = true;
public static bool IKOverrideJump { get; private set; } = true; public static bool IKOverrideJump { get; private set; } = true;
public static bool DetectEmotes { get; private set; } = true; public static bool DetectEmotes { get; private set; } = true;
public static bool FollowHips { get; private set; } = true; public static bool FollowHips { get; private set; } = true;
public static bool MassCenter { get; private set; } = true; public static bool MassCenter { get; private set; } = true;
public static bool ScaledSteps { get; private set; } = true;
public static bool ScaledJump { get; private set; } = false; public static bool ScaledJump { get; private set; } = false;
public static bool CollisionScale { get; private set; } = true;
public static bool OverrideFix { get; private set; } = true; public static bool OverrideFix { get; private set; } = true;
static MelonLoader.MelonPreferences_Category ms_category = null; static MelonLoader.MelonPreferences_Category ms_category = null;
static List<MelonLoader.MelonPreferences_Entry> ms_entries = null; static List<MelonLoader.MelonPreferences_Entry> ms_entries = null;
static public event Action<bool> IKOverrideCrouchChange;
static public event Action<float> CrouchLimitChange; static public event Action<float> CrouchLimitChange;
static public event Action<bool> IKOverrideProneChange;
static public event Action<float> ProneLimitChange; static public event Action<float> ProneLimitChange;
static public event Action<bool> PoseTransitionsChange;
static public event Action<bool> AdjustedMovementChange;
static public event Action<bool> IKOverrideFlyChange; static public event Action<bool> IKOverrideFlyChange;
static public event Action<bool> IKOverrideJumpChange; static public event Action<bool> IKOverrideJumpChange;
static public event Action<bool> DetectEmotesChange; static public event Action<bool> DetectEmotesChange;
static public event Action<bool> FollowHipsChange; static public event Action<bool> FollowHipsChange;
static public event Action<bool> MassCenterChange; static public event Action<bool> MassCenterChange;
static public event Action<bool> ScaledStepsChange;
static public event Action<bool> ScaledJumpChange; static public event Action<bool> ScaledJumpChange;
static public event Action<bool> CollisionScaleChange;
static public event Action<bool> OverrideFixChange; static public event Action<bool> OverrideFixChange;
internal static void Init() internal static void Init()
@ -67,37 +49,25 @@ namespace ml_amt
ms_entries = new List<MelonLoader.MelonPreferences_Entry>() ms_entries = new List<MelonLoader.MelonPreferences_Entry>()
{ {
ms_category.CreateEntry(ModSetting.IKOverrideCrouch.ToString(), IKOverrideCrouch),
ms_category.CreateEntry(ModSetting.CrouchLimit.ToString(), (int)(CrouchLimit * 100f)), ms_category.CreateEntry(ModSetting.CrouchLimit.ToString(), (int)(CrouchLimit * 100f)),
ms_category.CreateEntry(ModSetting.IKOverrideProne.ToString(), IKOverrideProne),
ms_category.CreateEntry(ModSetting.ProneLimit.ToString(), (int)(ProneLimit * 100f)), ms_category.CreateEntry(ModSetting.ProneLimit.ToString(), (int)(ProneLimit * 100f)),
ms_category.CreateEntry(ModSetting.PoseTransitions.ToString(), PoseTransitions),
ms_category.CreateEntry(ModSetting.AdjustedMovement.ToString(), AdjustedMovement),
ms_category.CreateEntry(ModSetting.IKOverrideFly.ToString(), IKOverrideFly), ms_category.CreateEntry(ModSetting.IKOverrideFly.ToString(), IKOverrideFly),
ms_category.CreateEntry(ModSetting.IKOverrideJump.ToString(), IKOverrideJump), ms_category.CreateEntry(ModSetting.IKOverrideJump.ToString(), IKOverrideJump),
ms_category.CreateEntry(ModSetting.DetectEmotes.ToString(), DetectEmotes), ms_category.CreateEntry(ModSetting.DetectEmotes.ToString(), DetectEmotes),
ms_category.CreateEntry(ModSetting.FollowHips.ToString(), FollowHips), ms_category.CreateEntry(ModSetting.FollowHips.ToString(), FollowHips),
ms_category.CreateEntry(ModSetting.MassCenter.ToString(), MassCenter), ms_category.CreateEntry(ModSetting.MassCenter.ToString(), MassCenter),
ms_category.CreateEntry(ModSetting.ScaledSteps.ToString(), ScaledSteps),
ms_category.CreateEntry(ModSetting.ScaledJump.ToString(), ScaledJump), ms_category.CreateEntry(ModSetting.ScaledJump.ToString(), ScaledJump),
ms_category.CreateEntry(ModSetting.CollisionScale.ToString(), CollisionScale),
ms_category.CreateEntry(ModSetting.OverrideFix.ToString(), OverrideFix) ms_category.CreateEntry(ModSetting.OverrideFix.ToString(), OverrideFix)
}; };
IKOverrideCrouch = (bool)ms_entries[(int)ModSetting.IKOverrideCrouch].BoxedValue;
CrouchLimit = ((int)ms_entries[(int)ModSetting.CrouchLimit].BoxedValue) * 0.01f; CrouchLimit = ((int)ms_entries[(int)ModSetting.CrouchLimit].BoxedValue) * 0.01f;
IKOverrideProne = (bool)ms_entries[(int)ModSetting.IKOverrideProne].BoxedValue;
ProneLimit = ((int)ms_entries[(int)ModSetting.ProneLimit].BoxedValue) * 0.01f; ProneLimit = ((int)ms_entries[(int)ModSetting.ProneLimit].BoxedValue) * 0.01f;
PoseTransitions = (bool)ms_entries[(int)ModSetting.PoseTransitions].BoxedValue;
AdjustedMovement = (bool)ms_entries[(int)ModSetting.AdjustedMovement].BoxedValue;
IKOverrideFly = (bool)ms_entries[(int)ModSetting.IKOverrideFly].BoxedValue; IKOverrideFly = (bool)ms_entries[(int)ModSetting.IKOverrideFly].BoxedValue;
IKOverrideJump = (bool)ms_entries[(int)ModSetting.IKOverrideJump].BoxedValue; IKOverrideJump = (bool)ms_entries[(int)ModSetting.IKOverrideJump].BoxedValue;
DetectEmotes = (bool)ms_entries[(int)ModSetting.DetectEmotes].BoxedValue; DetectEmotes = (bool)ms_entries[(int)ModSetting.DetectEmotes].BoxedValue;
FollowHips = (bool)ms_entries[(int)ModSetting.FollowHips].BoxedValue; FollowHips = (bool)ms_entries[(int)ModSetting.FollowHips].BoxedValue;
MassCenter = (bool)ms_entries[(int)ModSetting.MassCenter].BoxedValue; MassCenter = (bool)ms_entries[(int)ModSetting.MassCenter].BoxedValue;
ScaledSteps = (bool)ms_entries[(int)ModSetting.ScaledSteps].BoxedValue;
ScaledJump = (bool)ms_entries[(int)ModSetting.ScaledJump].BoxedValue; ScaledJump = (bool)ms_entries[(int)ModSetting.ScaledJump].BoxedValue;
CollisionScale = (bool)ms_entries[(int)ModSetting.CollisionScale].BoxedValue;
OverrideFix = (bool)ms_entries[(int)ModSetting.OverrideFix].BoxedValue; OverrideFix = (bool)ms_entries[(int)ModSetting.OverrideFix].BoxedValue;
MelonLoader.MelonCoroutines.Start(WaitMainMenuUi()); MelonLoader.MelonCoroutines.Start(WaitMainMenuUi());
@ -156,34 +126,6 @@ namespace ml_amt
{ {
switch(l_setting) switch(l_setting)
{ {
case ModSetting.IKOverrideCrouch:
{
IKOverrideCrouch = bool.Parse(p_value);
IKOverrideCrouchChange?.Invoke(IKOverrideCrouch);
}
break;
case ModSetting.IKOverrideProne:
{
IKOverrideProne = bool.Parse(p_value);
IKOverrideProneChange?.Invoke(IKOverrideProne);
}
break;
case ModSetting.PoseTransitions:
{
PoseTransitions = bool.Parse(p_value);
PoseTransitionsChange?.Invoke(PoseTransitions);
}
break;
case ModSetting.AdjustedMovement:
{
AdjustedMovement = bool.Parse(p_value);
AdjustedMovementChange?.Invoke(AdjustedMovement);
}
break;
case ModSetting.IKOverrideFly: case ModSetting.IKOverrideFly:
{ {
IKOverrideFly = bool.Parse(p_value); IKOverrideFly = bool.Parse(p_value);
@ -219,13 +161,6 @@ namespace ml_amt
} }
break; break;
case ModSetting.ScaledSteps:
{
ScaledSteps = bool.Parse(p_value);
ScaledStepsChange?.Invoke(ScaledSteps);
}
break;
case ModSetting.ScaledJump: case ModSetting.ScaledJump:
{ {
ScaledJump = bool.Parse(p_value); ScaledJump = bool.Parse(p_value);
@ -233,13 +168,6 @@ namespace ml_amt
} }
break; break;
case ModSetting.CollisionScale:
{
CollisionScale = bool.Parse(p_value);
CollisionScaleChange?.Invoke(CollisionScale);
}
break;
case ModSetting.OverrideFix: case ModSetting.OverrideFix:
{ {
OverrideFix = bool.Parse(p_value); OverrideFix = bool.Parse(p_value);

View file

@ -1,4 +1,5 @@
using ABI.CCK.Components; using ABI.CCK.Components;
using ABI_RC.Core.UI;
using ABI_RC.Systems.MovementSystem; using ABI_RC.Systems.MovementSystem;
using RootMotion.FinalIK; using RootMotion.FinalIK;
using System.Reflection; using System.Reflection;

View file

@ -1,107 +1,89 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>netstandard2.1</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Authors>SDraw</Authors>
<ProjectGuid>{74E13D02-A506-41A2-A2CF-C8B3D5B1E452}</ProjectGuid> <Company>None</Company>
<OutputType>Library</OutputType> <Product>AvatarMotionTweaker</Product>
<AppDesignerFolder>Properties</AppDesignerFolder> <PackageId>AvatarMotionTweaker</PackageId>
<RootNamespace>ml_amt</RootNamespace> <Version>1.2.9</Version>
<Platforms>x64</Platforms>
<AssemblyName>ml_amt</AssemblyName> <AssemblyName>ml_amt</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <DebugType>none</DebugType>
</PropertyGroup> <DebugSymbols>false</DebugSymbols>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="0Harmony"> <Compile Remove="Test.cs" />
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Games\Steam\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="cohtml.Net">
<Private>False</Private>
</Reference>
<Reference Include="Cohtml.Runtime">
<Private>False</Private>
</Reference>
<Reference Include="MelonLoader, Version=0.5.4.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="ml_pmc">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\Mods\ml_pmc.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ml_prm">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\Mods\ml_prm.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine.AnimationModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Fixes\AnimatorAnalyzer.cs" /> <None Remove="AvatarMotionTweaker.json" />
<Compile Include="AvatarParameter.cs" /> <None Remove="resources\menu.js" />
<Compile Include="Fixes\AnimatorOverrideControllerFix.cs" />
<Compile Include="Fixes\FBTDetectionFix.cs" />
<Compile Include="Fixes\MovementJumpFix.cs" />
<Compile Include="Fixes\PlayerColliderFix.cs" />
<Compile Include="ModSupporter.cs" />
<Compile Include="MotionTweaker.cs" />
<Compile Include="Main.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Scripts.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Utils.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="resources\menu.js" /> <EmbeddedResource Include="resources\menu.js" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <ItemGroup>
<PostBuildEvent>copy /y "$(TargetPath)" "D:\Games\Steam\steamapps\common\ChilloutVR\Mods\"</PostBuildEvent> <Reference Include="0Harmony">
</PropertyGroup> <HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\0Harmony.dll</HintPath>
</Project> <Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="cohtml.Net">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\cohtml.Net.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Cohtml.Runtime">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Cohtml.Runtime.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="MelonLoader">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\MelonLoader.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ml_pmc">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\Mods\ml_pmc.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ml_prm">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\Mods\ml_prm.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.AnimationModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy /y &quot;$(TargetPath)&quot; &quot;D:\Games\Steam\steamapps\common\ChilloutVR\Mods\&quot;" />
</Target>
</Project>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ReferencePath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\;D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\</ReferencePath>
</PropertyGroup>
</Project>

View file

@ -180,31 +180,17 @@ function inp_toggle_mod_amt(_obj, _callbackName) {
<div class ="subcategory-description"></div> <div class ="subcategory-description"></div>
</div> </div>
<div class ="row-wrapper">
<div class ="option-caption">IK override while crouching: </div>
<div class ="option-input">
<div id="IKOverrideCrouch" class ="inp_toggle no-scroll" data-current="true"></div>
</div>
</div>
<div class ="row-wrapper"> <div class ="row-wrapper">
<div class ="option-caption">Crouch limit: </div> <div class ="option-caption">Crouch limit: </div>
<div class ="option-input"> <div class ="option-input">
<div id="CrouchLimit" class ="inp_slider no-scroll" data-min="0" data-max="100" data-current="65"></div> <div id="CrouchLimit" class ="inp_slider no-scroll" data-min="0" data-max="100" data-current="75"></div>
</div>
</div>
<div class ="row-wrapper">
<div class ="option-caption">IK override while proning: </div>
<div class ="option-input">
<div id="IKOverrideProne" class ="inp_toggle no-scroll" data-current="true"></div>
</div> </div>
</div> </div>
<div class ="row-wrapper"> <div class ="row-wrapper">
<div class ="option-caption">Prone limit: </div> <div class ="option-caption">Prone limit: </div>
<div class ="option-input"> <div class ="option-input">
<div id="ProneLimit" class ="inp_slider no-scroll" data-min="0" data-max="100" data-current="30"></div> <div id="ProneLimit" class ="inp_slider no-scroll" data-min="0" data-max="100" data-current="40"></div>
</div> </div>
</div> </div>
@ -229,20 +215,6 @@ function inp_toggle_mod_amt(_obj, _callbackName) {
</div> </div>
</div> </div>
<div class ="row-wrapper">
<div class ="option-caption">Pose transitions: </div>
<div class ="option-input">
<div id="PoseTransitions" class ="inp_toggle no-scroll" data-current="true"></div>
</div>
</div>
<div class ="row-wrapper">
<div class ="option-caption">Adjusted pose movement speed: </div>
<div class ="option-input">
<div id="AdjustedMovement" class ="inp_toggle no-scroll" data-current="true"></div>
</div>
</div>
<div class ="row-wrapper"> <div class ="row-wrapper">
<div class ="option-caption">Detect animations emote tag: </div> <div class ="option-caption">Detect animations emote tag: </div>
<div class ="option-input"> <div class ="option-input">
@ -257,13 +229,6 @@ function inp_toggle_mod_amt(_obj, _callbackName) {
</div> </div>
</div> </div>
<div class ="row-wrapper">
<div class ="option-caption">Scaled locomotion steps: </div>
<div class ="option-input">
<div id="ScaledSteps" class ="inp_toggle no-scroll" data-current="true"></div>
</div>
</div>
<h4><p style="color: #7F7F7F">Avatar independent game fixes/overhauls</p></h4><br> <h4><p style="color: #7F7F7F">Avatar independent game fixes/overhauls</p></h4><br>
<div class ="row-wrapper"> <div class ="row-wrapper">
@ -272,13 +237,6 @@ function inp_toggle_mod_amt(_obj, _callbackName) {
<div id="ScaledJump" class ="inp_toggle no-scroll" data-current="false"></div> <div id="ScaledJump" class ="inp_toggle no-scroll" data-current="false"></div>
</div> </div>
</div> </div>
<div class ="row-wrapper">
<div class ="option-caption">Alternative avatar collider: </div>
<div class ="option-input">
<div id="CollisionScale" class ="inp_toggle no-scroll" data-current="true"></div>
</div>
</div>
<div class ="row-wrapper"> <div class ="row-wrapper">
<div class ="option-caption">Fix animator overrides (chairs, etc.): </div> <div class ="option-caption">Fix animator overrides (chairs, etc.): </div>

View file

@ -1,10 +1,6 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyTitle("DesktopReticleSwitch")] [assembly: MelonLoader.MelonInfo(typeof(ml_drs.DesktopReticleSwitch), "DesktopReticleSwitch", "1.0.1", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: MelonLoader.MelonInfo(typeof(ml_drs.DesktopReticleSwitch), "DesktopReticleSwitch", "1.0.0", "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,76 +1,49 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>netstandard2.1</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platforms>x64</Platforms>
<ProjectGuid>{06CD5155-4459-48C3-8A53-E0B91136351B}</ProjectGuid> <PackageId>DesktopReticleSwitch</PackageId>
<OutputType>Library</OutputType> <Product>DesktopReticleSwitch</Product>
<AppDesignerFolder>Properties</AppDesignerFolder> <Authors>SDraw</Authors>
<RootNamespace>ml_drs</RootNamespace> <Company>None</Company>
<AssemblyName>ml_drs</AssemblyName> <Version>1.0.1</Version>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutputPath>bin\x64\Debug\</OutputPath> <DebugType>none</DebugType>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DebugSymbols>false</DebugSymbols>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <None Remove="DesktopReticleSwitch.json" />
<SpecificVersion>False</SpecificVersion> </ItemGroup>
<Private>False</Private>
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath> <ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>false</Private>
</Reference> </Reference>
<Reference Include="cohtml.Net"> <Reference Include="cohtml.Net">
<HintPath>C:\Games\Steam\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>
</Reference> </Reference>
<Reference Include="Cohtml.Runtime"> <Reference Include="MelonLoader">
<HintPath>C:\Games\Steam\common\ChilloutVR\ChilloutVR_Data\Managed\Cohtml.Runtime.dll</HintPath> <HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\MelonLoader.dll</HintPath>
<Private>False</Private> <Private>false</Private>
</Reference> </Reference>
<Reference Include="MelonLoader, Version=0.5.7.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine.CoreModule"> <Reference Include="UnityEngine.CoreModule">
<Private>False</Private> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>false</Private>
</Reference> </Reference>
<Reference Include="UnityEngine.InputLegacyModule"> <Reference Include="UnityEngine.InputLegacyModule">
<HintPath>C:\Games\Steam\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
<Private>False</Private> <Private>false</Private>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" /> <Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Compile Include="Properties\AssemblyInfo.cs" /> <Exec Command="copy /y &quot;$(TargetPath)&quot; &quot;D:\Games\Steam\steamapps\common\ChilloutVR\Mods\&quot;" />
</ItemGroup> </Target>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> </Project>
<PostBuildEvent>copy /y "$(TargetPath)" "D:\Games\Steam\steamapps\common\ChilloutVR\Mods\"</PostBuildEvent>
</PropertyGroup>
</Project>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ReferencePath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\;D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\</ReferencePath>
</PropertyGroup>
</Project>

View file

@ -1,10 +1,6 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyTitle("ExtendedGameNotifications")] [assembly: MelonLoader.MelonInfo(typeof(ml_egn.ExtendedGameNotifications), "ExtendedGameNotifications", "1.0.3", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: AssemblyVersion("1.0.2")]
[assembly: AssemblyFileVersion("1.0.2")]
[assembly: MelonLoader.MelonInfo(typeof(ml_egn.ExtendedGameNotifications), "ExtendedGameNotifications", "1.0.2", "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,82 +1,55 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>netstandard2.1</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platforms>x64</Platforms>
<ProjectGuid>{1B5ACA07-6266-4C9A-BA30-D4BBE6634846}</ProjectGuid> <PackageId>ExtendedGameNotifications</PackageId>
<OutputType>Library</OutputType> <Version>1.0.3</Version>
<AppDesignerFolder>Properties</AppDesignerFolder> <Authors>SDraw</Authors>
<RootNamespace>ml_egn</RootNamespace> <Company>None</Company>
<AssemblyName>ml_egn</AssemblyName> <Product>ExtendedGameNotifications</Product>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutputPath>bin\x64\Debug\</OutputPath> <DebugType>none</DebugType>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DebugSymbols>false</DebugSymbols>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="0Harmony, Version=2.9.0.0, Culture=neutral, processorArchitecture=MSIL"> <None Remove="ExtendedGameNotifications.json" />
<SpecificVersion>False</SpecificVersion> </ItemGroup>
<HintPath>F:\games\Steam\common\ChilloutVR\MelonLoader\0Harmony.dll</HintPath>
<Private>False</Private> <ItemGroup>
<Reference Include="0Harmony">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\0Harmony.dll</HintPath>
</Reference> </Reference>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Assembly-CSharp">
<SpecificVersion>False</SpecificVersion> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
<HintPath>F:\games\Steam\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath> <Private>false</Private>
<Private>False</Private> </Reference>
<Reference Include="cohtml.Net">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\cohtml.Net.dll</HintPath>
<Private>false</Private>
</Reference> </Reference>
<Reference Include="DarkRift"> <Reference Include="DarkRift">
<Private>False</Private> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\DarkRift.dll</HintPath>
<Private>false</Private>
</Reference> </Reference>
<Reference Include="DarkRift.Client, Version=2.4.5.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="DarkRift.Client">
<SpecificVersion>False</SpecificVersion> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\DarkRift.Client.dll</HintPath>
<Private>False</Private> <Private>false</Private>
</Reference> </Reference>
<Reference Include="MelonLoader, Version=0.5.4.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MelonLoader">
<SpecificVersion>False</SpecificVersion> <HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\MelonLoader.dll</HintPath>
<HintPath>F:\games\Steam\common\ChilloutVR\MelonLoader\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="UnityEngine.CoreModule">
<Reference Include="System.Core" /> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Reference Include="System.Xml.Linq" /> <Private>false</Private>
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" /> <Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Compile Include="Properties\AssemblyInfo.cs" /> <Exec Command="copy /y &quot;$(TargetPath)&quot; &quot;D:\Games\Steam\steamapps\common\ChilloutVR\Mods\&quot;" />
<Compile Include="Utils.cs" /> </Target>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project>
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>copy /y "$(TargetPath)" "D:\Games\Steam\steamapps\common\ChilloutVR\Mods\"</PostBuildEvent>
</PropertyGroup>
</Project>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ReferencePath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\;D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\</ReferencePath>
</PropertyGroup>
</Project>

View file

@ -2,16 +2,14 @@
using ABI_RC.Core.Player; using ABI_RC.Core.Player;
using ABI_RC.Core.Savior; using ABI_RC.Core.Savior;
using ABI_RC.Systems.IK; using ABI_RC.Systems.IK;
using ABI_RC.Systems.InputManagement;
using System.Collections; using System.Collections;
using UnityEngine; using UnityEngine;
namespace ml_lme namespace ml_lme
{ {
[DisallowMultipleComponent]
class LeapInput : CVRInputModule class LeapInput : CVRInputModule
{ {
CVRInputManager m_inputManager = null;
InputModuleSteamVR m_steamVrModule = null;
bool m_inVR = false; bool m_inVR = false;
bool m_gripToGrab = true; bool m_gripToGrab = true;
@ -26,29 +24,37 @@ namespace ml_lme
bool m_gripLeft = false; bool m_gripLeft = false;
bool m_gripRight = false; bool m_gripRight = false;
public new void Start() ~LeapInput()
{ {
base.Start(); Settings.EnabledChange -= this.OnEnableChange;
Settings.InputChange -= this.OnInputChange;
MetaPort.Instance.settings.settingBoolChanged.RemoveListener(this.OnGameSettingBoolChange);
}
public override void ModuleAdded()
{
base.ModuleAdded();
InputEnabled = Settings.Enabled;
HapticFeedback = false;
m_inputManager = CVRInputManager.Instance; // _inputManager is stripped out, cool beans
m_steamVrModule = m_inputManager.GetComponent<InputModuleSteamVR>();
m_inVR = Utils.IsInVR(); m_inVR = Utils.IsInVR();
m_handRayLeft = LeapTracking.GetInstance().GetLeftHand().gameObject.AddComponent<ControllerRay>(); m_handRayLeft = LeapTracking.Instance.GetLeftHand().gameObject.AddComponent<ControllerRay>();
m_handRayLeft.hand = true; m_handRayLeft.hand = true;
m_handRayLeft.generalMask = -1485; m_handRayLeft.generalMask = -1485;
m_handRayLeft.isInteractionRay = true; m_handRayLeft.isInteractionRay = true;
m_handRayLeft.triggerGazeEvents = false; m_handRayLeft.triggerGazeEvents = false;
m_handRayLeft.holderRoot = m_handRayLeft.gameObject; m_handRayLeft.holderRoot = m_handRayLeft.gameObject;
m_handRayLeft.attachmentDistance = 0f;
m_handRayRight = LeapTracking.GetInstance().GetRightHand().gameObject.AddComponent<ControllerRay>(); m_handRayRight = LeapTracking.Instance.GetRightHand().gameObject.AddComponent<ControllerRay>();
m_handRayRight.hand = false; m_handRayRight.hand = false;
m_handRayRight.generalMask = -1485; m_handRayRight.generalMask = -1485;
m_handRayRight.isInteractionRay = true; m_handRayRight.isInteractionRay = true;
m_handRayRight.triggerGazeEvents = false; m_handRayRight.triggerGazeEvents = false;
m_handRayRight.holderRoot = m_handRayRight.gameObject; m_handRayRight.holderRoot = m_handRayRight.gameObject;
m_handRayRight.attachmentDistance = 0f; m_handRayLeft.attachmentDistance = 0f;
m_lineLeft = m_handRayLeft.gameObject.AddComponent<LineRenderer>(); m_lineLeft = m_handRayLeft.gameObject.AddComponent<LineRenderer>();
m_lineLeft.endWidth = 1f; m_lineLeft.endWidth = 1f;
@ -61,6 +67,7 @@ namespace ml_lme
m_lineLeft.enabled = false; m_lineLeft.enabled = false;
m_lineLeft.receiveShadows = false; m_lineLeft.receiveShadows = false;
m_handRayLeft.lineRenderer = m_lineLeft; m_handRayLeft.lineRenderer = m_lineLeft;
m_handRayRight.attachmentDistance = 0f;
m_lineRight = m_handRayRight.gameObject.AddComponent<LineRenderer>(); m_lineRight = m_handRayRight.gameObject.AddComponent<LineRenderer>();
m_lineRight.endWidth = 1f; m_lineRight.endWidth = 1f;
@ -112,20 +119,12 @@ namespace ml_lme
m_lineRight.gameObject.layer = PlayerSetup.Instance.leftRay.gameObject.layer; m_lineRight.gameObject.layer = PlayerSetup.Instance.leftRay.gameObject.layer;
} }
void OnDestroy() public override void UpdateInput()
{ {
Settings.EnabledChange -= this.OnEnableChange; if(InputEnabled)
Settings.InputChange -= this.OnInputChange;
MetaPort.Instance.settings.settingBoolChanged.RemoveListener(this.OnGameSettingBoolChange);
}
void Update()
{
GestureMatcher.LeapData l_data = LeapManager.GetInstance().GetLatestData();
if(Settings.Enabled)
{ {
GestureMatcher.LeapData l_data = LeapManager.Instance.GetLatestData();
if(l_data.m_leftHand.m_present) if(l_data.m_leftHand.m_present)
{ {
SetFingersInput(l_data.m_leftHand, true); SetFingersInput(l_data.m_leftHand, true);
@ -162,25 +161,24 @@ namespace ml_lme
{ {
if(m_inVR) if(m_inVR)
{ {
m_inputManager.individualFingerTracking = !m_steamVrModule.GetIndexGestureToggle(); _inputManager.individualFingerTracking = !CVRInputManager._moduleXR.GestureToggleValue;
m_inputManager.individualFingerTracking |= (l_data.m_leftHand.m_present || l_data.m_rightHand.m_present); _inputManager.individualFingerTracking |= (l_data.m_leftHand.m_present || l_data.m_rightHand.m_present);
} }
else else
m_inputManager.individualFingerTracking = (l_data.m_leftHand.m_present || l_data.m_rightHand.m_present); _inputManager.individualFingerTracking = (l_data.m_leftHand.m_present || l_data.m_rightHand.m_present);
IKSystem.Instance.FingerSystem.controlActive = m_inputManager.individualFingerTracking; IKSystem.Instance.FingerSystem.controlActive = _inputManager.individualFingerTracking;
} }
}
m_handRayLeft.enabled = (l_data.m_leftHand.m_present && (!m_inVR || !Utils.IsLeftHandTracked() || !Settings.FingersOnly)); m_handRayLeft.enabled = (l_data.m_leftHand.m_present && (!m_inVR || !Utils.IsLeftHandTracked() || !Settings.FingersOnly));
m_handRayRight.enabled = (l_data.m_rightHand.m_present && (!m_inVR || !Utils.IsRightHandTracked() || !Settings.FingersOnly)); m_handRayRight.enabled = (l_data.m_rightHand.m_present && (!m_inVR || !Utils.IsRightHandTracked() || !Settings.FingersOnly));
base.UpdateInput();
}
} }
public override void UpdateInput() public override void Update_Interaction()
{ {
if(!Settings.Enabled) GestureMatcher.LeapData l_data = LeapManager.Instance.GetLatestData();
return;
GestureMatcher.LeapData l_data = LeapManager.GetInstance().GetLatestData();
if(Settings.Input) if(Settings.Input)
{ {
@ -193,22 +191,22 @@ namespace ml_lme
l_interactValue = Mathf.Clamp01(Mathf.InverseLerp(Mathf.Min(Settings.GripThreadhold, Settings.InteractThreadhold), Mathf.Max(Settings.GripThreadhold, Settings.InteractThreadhold), l_strength)); l_interactValue = Mathf.Clamp01(Mathf.InverseLerp(Mathf.Min(Settings.GripThreadhold, Settings.InteractThreadhold), Mathf.Max(Settings.GripThreadhold, Settings.InteractThreadhold), l_strength));
else else
l_interactValue = Mathf.Clamp01(Mathf.InverseLerp(0f, Settings.InteractThreadhold, l_strength)); l_interactValue = Mathf.Clamp01(Mathf.InverseLerp(0f, Settings.InteractThreadhold, l_strength));
m_inputManager.interactLeftValue = Mathf.Max(l_interactValue, m_inputManager.interactLeftValue); _inputManager.interactLeftValue = Mathf.Max(l_interactValue, _inputManager.interactLeftValue);
if(m_interactLeft != (l_strength > Settings.InteractThreadhold)) if(m_interactLeft != (l_strength > Settings.InteractThreadhold))
{ {
m_interactLeft = (l_strength > Settings.InteractThreadhold); m_interactLeft = (l_strength > Settings.InteractThreadhold);
m_inputManager.interactLeftDown |= m_interactLeft; _inputManager.interactLeftDown |= m_interactLeft;
m_inputManager.interactLeftUp |= !m_interactLeft; _inputManager.interactLeftUp |= !m_interactLeft;
} }
float l_gripValue = Mathf.Clamp01(Mathf.InverseLerp(0f, Settings.GripThreadhold, l_strength)); float l_gripValue = Mathf.Clamp01(Mathf.InverseLerp(0f, Settings.GripThreadhold, l_strength));
m_inputManager.gripLeftValue = Mathf.Max(l_gripValue, m_inputManager.gripLeftValue); _inputManager.gripLeftValue = Mathf.Max(l_gripValue, _inputManager.gripLeftValue);
if(m_gripLeft != (l_strength > Settings.GripThreadhold)) if(m_gripLeft != (l_strength > Settings.GripThreadhold))
{ {
m_gripLeft = (l_strength > Settings.GripThreadhold); m_gripLeft = (l_strength > Settings.GripThreadhold);
m_inputManager.gripLeftDown |= m_gripLeft; _inputManager.gripLeftDown |= m_gripLeft;
m_inputManager.gripLeftUp |= !m_gripLeft; _inputManager.gripLeftUp |= !m_gripLeft;
} }
} }
@ -221,22 +219,22 @@ namespace ml_lme
l_interactValue = Mathf.Clamp01(Mathf.InverseLerp(Mathf.Min(Settings.GripThreadhold, Settings.InteractThreadhold), Mathf.Max(Settings.GripThreadhold, Settings.InteractThreadhold), l_strength)); l_interactValue = Mathf.Clamp01(Mathf.InverseLerp(Mathf.Min(Settings.GripThreadhold, Settings.InteractThreadhold), Mathf.Max(Settings.GripThreadhold, Settings.InteractThreadhold), l_strength));
else else
l_interactValue = Mathf.Clamp01(Mathf.InverseLerp(0f, Settings.InteractThreadhold, l_strength)); l_interactValue = Mathf.Clamp01(Mathf.InverseLerp(0f, Settings.InteractThreadhold, l_strength));
m_inputManager.interactRightValue = Mathf.Max(l_interactValue, m_inputManager.interactRightValue); _inputManager.interactRightValue = Mathf.Max(l_interactValue, _inputManager.interactRightValue);
if(m_interactRight != (l_strength > Settings.InteractThreadhold)) if(m_interactRight != (l_strength > Settings.InteractThreadhold))
{ {
m_interactRight = (l_strength > Settings.InteractThreadhold); m_interactRight = (l_strength > Settings.InteractThreadhold);
m_inputManager.interactRightDown |= m_interactRight; _inputManager.interactRightDown |= m_interactRight;
m_inputManager.interactRightUp |= !m_interactRight; _inputManager.interactRightUp |= !m_interactRight;
} }
float l_gripValue = Mathf.Clamp01(Mathf.InverseLerp(0f, Settings.GripThreadhold, l_strength)); float l_gripValue = Mathf.Clamp01(Mathf.InverseLerp(0f, Settings.GripThreadhold, l_strength));
m_inputManager.gripRightValue = Mathf.Max(l_gripValue, m_inputManager.gripRightValue); _inputManager.gripRightValue = Mathf.Max(l_gripValue, _inputManager.gripRightValue);
if(m_gripRight != (l_strength > Settings.GripThreadhold)) if(m_gripRight != (l_strength > Settings.GripThreadhold))
{ {
m_gripRight = (l_strength > Settings.GripThreadhold); m_gripRight = (l_strength > Settings.GripThreadhold);
m_inputManager.gripRightDown |= m_gripRight; _inputManager.gripRightDown |= m_gripRight;
m_inputManager.gripRightUp |= !m_gripRight; _inputManager.gripRightUp |= !m_gripRight;
} }
} }
} }
@ -246,87 +244,91 @@ namespace ml_lme
// Left hand gestures // Left hand gestures
if(l_data.m_leftHand.m_present) if(l_data.m_leftHand.m_present)
{ {
m_inputManager.gestureLeftRaw = 0f; _inputManager.gestureLeftRaw = 0f;
// Finger Point & Finger Gun // Finger Point & Finger Gun
if((m_inputManager.fingerCurlLeftIndex < 0.2f) && (m_inputManager.fingerCurlLeftMiddle > 0.75f) && if(_inputManager.fingerCurlLeftIndex < 0.2f && _inputManager.fingerCurlLeftMiddle > 0.75f &&
(m_inputManager.fingerCurlLeftRing > 0.75f) && (m_inputManager.fingerCurlLeftPinky > 0.75f)) _inputManager.fingerCurlLeftRing > 0.75f && _inputManager.fingerCurlLeftPinky > 0.75f)
{ {
m_inputManager.gestureLeftRaw = (m_inputManager.fingerCurlLeftThumb >= 0.5f) ? 4f : 3f; _inputManager.gestureLeftRaw = _inputManager.fingerCurlLeftThumb >= 0.5f ? 4f : 3f;
} }
// Peace Sign // Peace Sign
if((m_inputManager.fingerCurlLeftIndex < 0.2f) && (m_inputManager.fingerCurlLeftMiddle < 0.2f) && if(_inputManager.fingerCurlLeftIndex < 0.2f && _inputManager.fingerCurlLeftMiddle < 0.2f &&
(m_inputManager.fingerCurlLeftRing > 0.75f) && (m_inputManager.fingerCurlLeftPinky > 0.75f)) _inputManager.fingerCurlLeftRing > 0.75f && _inputManager.fingerCurlLeftPinky > 0.75f)
{ {
m_inputManager.gestureLeftRaw = 5f; _inputManager.gestureLeftRaw = 5f;
} }
// Rock and Roll // Rock and Roll
if((m_inputManager.fingerCurlLeftIndex < 0.2f) && (m_inputManager.fingerCurlLeftMiddle > 0.75f) && if(_inputManager.fingerCurlLeftIndex < 0.2f && _inputManager.fingerCurlLeftMiddle > 0.75f &&
(m_inputManager.fingerCurlLeftRing > 0.75f) && (m_inputManager.fingerCurlLeftPinky < 0.5f)) _inputManager.fingerCurlLeftRing > 0.75f && _inputManager.fingerCurlLeftPinky < 0.5f)
{ {
m_inputManager.gestureLeftRaw = 6f; _inputManager.gestureLeftRaw = 6f;
} }
// Fist & Thumbs Up // Fist & Thumbs Up
if((m_inputManager.fingerCurlLeftIndex > 0.5f) && (m_inputManager.fingerCurlLeftMiddle > 0.5f) && if(_inputManager.fingerCurlLeftIndex > 0.5f && _inputManager.fingerCurlLeftMiddle > 0.5f &&
(m_inputManager.fingerCurlLeftRing > 0.5f) && (m_inputManager.fingerCurlLeftPinky > 0.5f)) _inputManager.fingerCurlLeftRing > 0.5f && _inputManager.fingerCurlLeftPinky > 0.5f)
{ {
m_inputManager.gestureLeftRaw = (m_inputManager.fingerCurlLeftThumb >= 0.5f) ? ((l_data.m_rightHand.m_grabStrength - 0.5f) * 2f) : 2f; _inputManager.gestureLeftRaw = _inputManager.fingerCurlLeftThumb >= 0.5f
? (l_data.m_rightHand.m_grabStrength - 0.5f) * 2f
: 2f;
} }
// Open Hand // Open Hand
if((m_inputManager.fingerCurlLeftIndex < 0.2f) && (m_inputManager.fingerCurlLeftMiddle < 0.2f) && if(_inputManager.fingerCurlLeftIndex < 0.2f && _inputManager.fingerCurlLeftMiddle < 0.2f &&
(m_inputManager.fingerCurlLeftRing < 0.2f) && (m_inputManager.fingerCurlLeftPinky < 0.2f)) _inputManager.fingerCurlLeftRing < 0.2f && _inputManager.fingerCurlLeftPinky < 0.2f)
{ {
m_inputManager.gestureLeftRaw = -1f; _inputManager.gestureLeftRaw = -1f;
} }
m_inputManager.gestureLeft = m_inputManager.gestureLeftRaw; _inputManager.gestureLeft = _inputManager.gestureLeftRaw;
} }
// Right hand gestures // Right hand gestures
if(l_data.m_rightHand.m_present) if(l_data.m_rightHand.m_present)
{ {
m_inputManager.gestureRightRaw = 0f; _inputManager.gestureRightRaw = 0f;
// Finger Point & Finger Gun // Finger Point & Finger Gun
if((m_inputManager.fingerCurlRightIndex < 0.2f) && (m_inputManager.fingerCurlRightMiddle > 0.75f) && if(_inputManager.fingerCurlRightIndex < 0.2f && _inputManager.fingerCurlRightMiddle > 0.75f &&
(m_inputManager.fingerCurlRightRing > 0.75f) && (m_inputManager.fingerCurlRightPinky > 0.75f)) _inputManager.fingerCurlRightRing > 0.75f && _inputManager.fingerCurlRightPinky > 0.75f)
{ {
m_inputManager.gestureRightRaw = (m_inputManager.fingerCurlRightThumb >= 0.5f) ? 4f : 3f; _inputManager.gestureRightRaw = _inputManager.fingerCurlRightThumb >= 0.5f ? 4f : 3f;
} }
// Peace Sign // Peace Sign
if((m_inputManager.fingerCurlRightIndex < 0.2f) && (m_inputManager.fingerCurlRightMiddle < 0.2f) && if(_inputManager.fingerCurlRightIndex < 0.2f && _inputManager.fingerCurlRightMiddle < 0.2f &&
(m_inputManager.fingerCurlRightRing > 0.75f) && (m_inputManager.fingerCurlRightPinky > 0.75f)) _inputManager.fingerCurlRightRing > 0.75f && _inputManager.fingerCurlRightPinky > 0.75f)
{ {
m_inputManager.gestureRightRaw = 5f; _inputManager.gestureRightRaw = 5f;
} }
// Rock and Roll // Rock and Roll
if((m_inputManager.fingerCurlRightIndex < 0.2f) && (m_inputManager.fingerCurlRightMiddle > 0.75f) && if(_inputManager.fingerCurlRightIndex < 0.2f && _inputManager.fingerCurlRightMiddle > 0.75f &&
(m_inputManager.fingerCurlRightRing > 0.75f) && (m_inputManager.fingerCurlRightPinky < 0.5f)) _inputManager.fingerCurlRightRing > 0.75f && _inputManager.fingerCurlRightPinky < 0.5f)
{ {
m_inputManager.gestureRightRaw = 6f; _inputManager.gestureRightRaw = 6f;
} }
// Fist & Thumbs Up // Fist & Thumbs Up
if((m_inputManager.fingerCurlRightIndex > 0.5f) && (m_inputManager.fingerCurlRightMiddle > 0.5f) && if(_inputManager.fingerCurlRightIndex > 0.5f && _inputManager.fingerCurlRightMiddle > 0.5f &&
(m_inputManager.fingerCurlRightRing > 0.5f) && (m_inputManager.fingerCurlRightPinky > 0.5f)) _inputManager.fingerCurlRightRing > 0.5f && _inputManager.fingerCurlRightPinky > 0.5f)
{ {
m_inputManager.gestureRightRaw = (m_inputManager.fingerCurlRightThumb >= 0.5f) ? ((l_data.m_rightHand.m_grabStrength - 0.5f) * 2f) : 2f; _inputManager.gestureRightRaw = _inputManager.fingerCurlRightThumb >= 0.5f
? (l_data.m_rightHand.m_grabStrength - 0.5f) * 2f
: 2f;
} }
// Open Hand // Open Hand
if((m_inputManager.fingerCurlRightIndex < 0.2f) && (m_inputManager.fingerCurlRightMiddle < 0.2f) && if(_inputManager.fingerCurlRightIndex < 0.2f && _inputManager.fingerCurlRightMiddle < 0.2f &&
(m_inputManager.fingerCurlRightRing < 0.2f) && (m_inputManager.fingerCurlRightPinky < 0.2f)) _inputManager.fingerCurlRightRing < 0.2f && _inputManager.fingerCurlRightPinky < 0.2f)
{ {
m_inputManager.gestureRightRaw = -1f; _inputManager.gestureRightRaw = -1f;
} }
m_inputManager.gestureRight = m_inputManager.gestureRightRaw; _inputManager.gestureRight = _inputManager.gestureRightRaw;
} }
} }
} }
@ -334,6 +336,8 @@ namespace ml_lme
// Settings changes // Settings changes
void OnEnableChange(bool p_state) void OnEnableChange(bool p_state)
{ {
InputEnabled = p_state;
OnInputChange(p_state && Settings.Input); OnInputChange(p_state && Settings.Input);
UpdateFingerTracking(); UpdateFingerTracking();
m_handVisibleLeft &= p_state; m_handVisibleLeft &= p_state;
@ -364,10 +368,10 @@ namespace ml_lme
void OnGesturesChange(bool p_state) void OnGesturesChange(bool p_state)
{ {
m_inputManager.gestureLeft = 0f; _inputManager.gestureLeft = 0f;
m_inputManager.gestureLeftRaw = 0f; _inputManager.gestureLeftRaw = 0f;
m_inputManager.gestureRight = 0f; _inputManager.gestureRight = 0f;
m_inputManager.gestureRightRaw = 0f; _inputManager.gestureRightRaw = 0f;
} }
// Game events // Game events
@ -386,8 +390,8 @@ namespace ml_lme
// Arbitrary // Arbitrary
void UpdateFingerTracking() void UpdateFingerTracking()
{ {
m_inputManager.individualFingerTracking = (Settings.Enabled || (m_inVR && Utils.AreKnucklesInUse() && !m_steamVrModule.GetIndexGestureToggle())); _inputManager.individualFingerTracking = (Settings.Enabled || (m_inVR && Utils.AreKnucklesInUse() && !CVRInputManager._moduleXR.GestureToggleValue));
IKSystem.Instance.FingerSystem.controlActive = m_inputManager.individualFingerTracking; IKSystem.Instance.FingerSystem.controlActive = _inputManager.individualFingerTracking;
if(!Settings.Enabled) if(!Settings.Enabled)
{ {
@ -400,29 +404,29 @@ namespace ml_lme
{ {
if(p_left) if(p_left)
{ {
m_inputManager.fingerCurlLeftThumb = p_hand.m_bends[0]; _inputManager.fingerCurlLeftThumb = p_hand.m_bends[0];
m_inputManager.fingerCurlLeftIndex = p_hand.m_bends[1]; _inputManager.fingerCurlLeftIndex = p_hand.m_bends[1];
m_inputManager.fingerCurlLeftMiddle = p_hand.m_bends[2]; _inputManager.fingerCurlLeftMiddle = p_hand.m_bends[2];
m_inputManager.fingerCurlLeftRing = p_hand.m_bends[3]; _inputManager.fingerCurlLeftRing = p_hand.m_bends[3];
m_inputManager.fingerCurlLeftPinky = p_hand.m_bends[4]; _inputManager.fingerCurlLeftPinky = p_hand.m_bends[4];
IKSystem.Instance.FingerSystem.leftThumbCurl = p_hand.m_bends[0]; _inputManager.fingerSpreadLeftThumb = p_hand.m_spreads[0];
IKSystem.Instance.FingerSystem.leftIndexCurl = p_hand.m_bends[1]; _inputManager.fingerSpreadLeftIndex = p_hand.m_spreads[1];
IKSystem.Instance.FingerSystem.leftMiddleCurl = p_hand.m_bends[2]; _inputManager.fingerSpreadLeftMiddle = p_hand.m_spreads[2];
IKSystem.Instance.FingerSystem.leftRingCurl = p_hand.m_bends[3]; _inputManager.fingerSpreadLeftRing = p_hand.m_spreads[3];
IKSystem.Instance.FingerSystem.leftPinkyCurl = p_hand.m_bends[4]; _inputManager.fingerSpreadLeftPinky = p_hand.m_spreads[4];
} }
else else
{ {
m_inputManager.fingerCurlRightThumb = p_hand.m_bends[0]; _inputManager.fingerCurlRightThumb = p_hand.m_bends[0];
m_inputManager.fingerCurlRightIndex = p_hand.m_bends[1]; _inputManager.fingerCurlRightIndex = p_hand.m_bends[1];
m_inputManager.fingerCurlRightMiddle = p_hand.m_bends[2]; _inputManager.fingerCurlRightMiddle = p_hand.m_bends[2];
m_inputManager.fingerCurlRightRing = p_hand.m_bends[3]; _inputManager.fingerCurlRightRing = p_hand.m_bends[3];
m_inputManager.fingerCurlRightPinky = p_hand.m_bends[4]; _inputManager.fingerCurlRightPinky = p_hand.m_bends[4];
IKSystem.Instance.FingerSystem.rightThumbCurl = p_hand.m_bends[0]; _inputManager.fingerSpreadRightThumb = p_hand.m_spreads[0];
IKSystem.Instance.FingerSystem.rightIndexCurl = p_hand.m_bends[1]; _inputManager.fingerSpreadRightIndex = p_hand.m_spreads[1];
IKSystem.Instance.FingerSystem.rightMiddleCurl = p_hand.m_bends[2]; _inputManager.fingerSpreadRightMiddle = p_hand.m_spreads[2];
IKSystem.Instance.FingerSystem.rightRingCurl = p_hand.m_bends[3]; _inputManager.fingerSpreadRightRing = p_hand.m_spreads[3];
IKSystem.Instance.FingerSystem.rightPinkyCurl = p_hand.m_bends[4]; _inputManager.fingerSpreadRightPinky = p_hand.m_spreads[4];
} }
} }
@ -430,29 +434,29 @@ namespace ml_lme
{ {
if(p_left) if(p_left)
{ {
m_inputManager.fingerCurlLeftThumb = 0f; _inputManager.fingerCurlLeftThumb = 0f;
m_inputManager.fingerCurlLeftIndex = 0f; _inputManager.fingerCurlLeftIndex = 0f;
m_inputManager.fingerCurlLeftMiddle = 0f; _inputManager.fingerCurlLeftMiddle = 0f;
m_inputManager.fingerCurlLeftRing = 0f; _inputManager.fingerCurlLeftRing = 0f;
m_inputManager.fingerCurlLeftPinky = 0f; _inputManager.fingerCurlLeftPinky = 0f;
IKSystem.Instance.FingerSystem.leftThumbCurl = 0f; _inputManager.fingerSpreadLeftThumb = 0f;
IKSystem.Instance.FingerSystem.leftIndexCurl = 0f; _inputManager.fingerSpreadLeftIndex = 0f;
IKSystem.Instance.FingerSystem.leftMiddleCurl = 0f; _inputManager.fingerSpreadLeftMiddle = 0f;
IKSystem.Instance.FingerSystem.leftRingCurl = 0f; _inputManager.fingerSpreadLeftRing = 0f;
IKSystem.Instance.FingerSystem.leftPinkyCurl = 0f; _inputManager.fingerSpreadLeftPinky = 0f;
} }
else else
{ {
m_inputManager.fingerCurlRightThumb = 0f; _inputManager.fingerCurlRightThumb = 0f;
m_inputManager.fingerCurlRightIndex = 0f; _inputManager.fingerCurlRightIndex = 0f;
m_inputManager.fingerCurlRightMiddle = 0f; _inputManager.fingerCurlRightMiddle = 0f;
m_inputManager.fingerCurlRightRing = 0f; _inputManager.fingerCurlRightRing = 0f;
m_inputManager.fingerCurlRightPinky = 0f; _inputManager.fingerCurlRightPinky = 0f;
IKSystem.Instance.FingerSystem.rightThumbCurl = 0f; _inputManager.fingerSpreadRightThumb = 0f;
IKSystem.Instance.FingerSystem.rightIndexCurl = 0f; _inputManager.fingerSpreadRightIndex = 0f;
IKSystem.Instance.FingerSystem.rightMiddleCurl = 0f; _inputManager.fingerSpreadRightMiddle = 0f;
IKSystem.Instance.FingerSystem.rightRingCurl = 0f; _inputManager.fingerSpreadRightRing = 0f;
IKSystem.Instance.FingerSystem.rightPinkyCurl = 0f; _inputManager.fingerSpreadRightPinky = 0f;
} }
} }
@ -460,13 +464,13 @@ namespace ml_lme
{ {
if(p_left) if(p_left)
{ {
m_inputManager.gestureLeft = 0f; _inputManager.gestureLeft = 0f;
m_inputManager.gestureLeftRaw = 0f; _inputManager.gestureLeftRaw = 0f;
} }
else else
{ {
m_inputManager.gestureRight = 0f; _inputManager.gestureRight = 0f;
m_inputManager.gestureRightRaw = 0f; _inputManager.gestureRightRaw = 0f;
} }
} }

View file

@ -1,5 +1,6 @@
using ABI_RC.Core.Player; using ABI_RC.Core.Player;
using ABI_RC.Core.Savior; using ABI_RC.Core.Savior;
using ABI_RC.Systems.InputManagement;
using System.Collections; using System.Collections;
using UnityEngine; using UnityEngine;
@ -8,32 +9,22 @@ namespace ml_lme
[DisallowMultipleComponent] [DisallowMultipleComponent]
class LeapManager : MonoBehaviour class LeapManager : MonoBehaviour
{ {
static LeapManager ms_instance = null; public static LeapManager Instance { get; private set; } = null;
readonly Leap.Controller m_leapController = null; Leap.Controller m_leapController = null;
readonly GestureMatcher.LeapData m_leapData = null; GestureMatcher.LeapData m_leapData = null;
LeapTracking m_leapTracking = null; LeapTracking m_leapTracking = null;
LeapTracked m_leapTracked = null; LeapTracked m_leapTracked = null;
LeapInput m_leapInput = null; LeapInput m_leapInput = null;
public static LeapManager GetInstance() => ms_instance; void Awake()
internal LeapManager()
{ {
if(Instance == null)
Instance = this;
m_leapController = new Leap.Controller(); m_leapController = new Leap.Controller();
m_leapData = new GestureMatcher.LeapData(); m_leapData = new GestureMatcher.LeapData();
}
~LeapManager()
{
m_leapController.StopConnection();
m_leapController.Dispose();
}
void Start()
{
if(ms_instance == null)
ms_instance = this;
DontDestroyOnLoad(this); DontDestroyOnLoad(this);
@ -49,41 +40,44 @@ namespace ml_lme
m_leapTracking = new GameObject("[LeapTrackingRoot]").AddComponent<LeapTracking>(); m_leapTracking = new GameObject("[LeapTrackingRoot]").AddComponent<LeapTracking>();
m_leapTracking.transform.parent = this.transform; m_leapTracking.transform.parent = this.transform;
MelonLoader.MelonCoroutines.Start(WaitForInputManager());
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
OnEnableChange(Settings.Enabled); OnEnableChange(Settings.Enabled);
OnTrackingModeChange(Settings.TrackingMode); OnTrackingModeChange(Settings.TrackingMode);
MelonLoader.MelonCoroutines.Start(WaitForObjects());
} }
void OnDestroy() void OnDestroy()
{ {
if(ms_instance == this) if(Instance == this)
ms_instance = null; Instance = null;
m_leapController.StopConnection();
m_leapController.Device -= this.OnLeapDeviceInitialized; m_leapController.Device -= this.OnLeapDeviceInitialized;
m_leapController.DeviceFailure -= this.OnLeapDeviceFailure; m_leapController.DeviceFailure -= this.OnLeapDeviceFailure;
m_leapController.DeviceLost -= this.OnLeapDeviceLost; m_leapController.DeviceLost -= this.OnLeapDeviceLost;
m_leapController.Connect -= this.OnLeapServiceConnect; m_leapController.Connect -= this.OnLeapServiceConnect;
m_leapController.Disconnect -= this.OnLeapServiceDisconnect; m_leapController.Disconnect -= this.OnLeapServiceDisconnect;
m_leapController.Dispose();
m_leapController = null;
Settings.EnabledChange -= this.OnEnableChange; Settings.EnabledChange -= this.OnEnableChange;
Settings.TrackingModeChange -= this.OnTrackingModeChange; Settings.TrackingModeChange -= this.OnTrackingModeChange;
} }
IEnumerator WaitForInputManager() IEnumerator WaitForObjects()
{ {
while(CVRInputManager.Instance == null) while(CVRInputManager.Instance == null)
yield return null; yield return null;
m_leapInput = CVRInputManager.Instance.gameObject.AddComponent<LeapInput>();
}
IEnumerator WaitForLocalPlayer()
{
while(PlayerSetup.Instance == null) while(PlayerSetup.Instance == null)
yield return null; yield return null;
while(LeapTracking.Instance == null)
yield return null;
m_leapInput = new LeapInput();
CVRInputManager.Instance.AddInputModule(m_leapInput);
m_leapTracked = PlayerSetup.Instance.gameObject.AddComponent<LeapTracked>(); m_leapTracked = PlayerSetup.Instance.gameObject.AddComponent<LeapTracked>();
} }
@ -168,8 +162,9 @@ namespace ml_lme
{ {
if(m_leapTracking != null) if(m_leapTracking != null)
m_leapTracking.OnAvatarSetup(); m_leapTracking.OnAvatarSetup();
if(m_leapInput != null)
m_leapInput.OnAvatarSetup(); m_leapInput?.OnAvatarSetup();
if(m_leapTracked != null) if(m_leapTracked != null)
m_leapTracked.OnAvatarSetup(); m_leapTracked.OnAvatarSetup();
} }
@ -182,8 +177,7 @@ namespace ml_lme
internal void OnRayScale(float p_scale) internal void OnRayScale(float p_scale)
{ {
if(m_leapInput != null) m_leapInput?.OnRayScale(p_scale);
m_leapInput.OnRayScale(p_scale);
} }
internal void OnPlayspaceScale(float p_relation) internal void OnPlayspaceScale(float p_relation)

View file

@ -43,12 +43,12 @@ namespace ml_lme
m_inVR = Utils.IsInVR(); m_inVR = Utils.IsInVR();
m_leftHandTarget = new GameObject("RotationTarget").transform; m_leftHandTarget = new GameObject("RotationTarget").transform;
m_leftHandTarget.parent = LeapTracking.GetInstance().GetLeftHand(); m_leftHandTarget.parent = LeapTracking.Instance.GetLeftHand();
m_leftHandTarget.localPosition = Vector3.zero; m_leftHandTarget.localPosition = Vector3.zero;
m_leftHandTarget.localRotation = Quaternion.identity; m_leftHandTarget.localRotation = Quaternion.identity;
m_rightHandTarget = new GameObject("RotationTarget").transform; m_rightHandTarget = new GameObject("RotationTarget").transform;
m_rightHandTarget.parent = LeapTracking.GetInstance().GetRightHand(); m_rightHandTarget.parent = LeapTracking.Instance.GetRightHand();
m_rightHandTarget.localPosition = Vector3.zero; m_rightHandTarget.localPosition = Vector3.zero;
m_rightHandTarget.localRotation = Quaternion.identity; m_rightHandTarget.localRotation = Quaternion.identity;
@ -72,7 +72,7 @@ namespace ml_lme
{ {
if(m_enabled) if(m_enabled)
{ {
GestureMatcher.LeapData l_data = LeapManager.GetInstance().GetLatestData(); GestureMatcher.LeapData l_data = LeapManager.Instance.GetLatestData();
if((m_leftArmIK != null) && (m_rightArmIK != null)) if((m_leftArmIK != null) && (m_rightArmIK != null))
{ {
@ -92,7 +92,7 @@ namespace ml_lme
if(l_data.m_leftHand.m_present && !m_leftTargetActive) if(l_data.m_leftHand.m_present && !m_leftTargetActive)
{ {
m_vrIK.solver.leftArm.target = m_leftHandTarget; m_vrIK.solver.leftArm.target = m_leftHandTarget;
m_vrIK.solver.leftArm.bendGoal = LeapTracking.GetInstance().GetLeftElbow(); m_vrIK.solver.leftArm.bendGoal = LeapTracking.Instance.GetLeftElbow();
m_vrIK.solver.leftArm.bendGoalWeight = (m_trackElbows ? 1f : 0f); m_vrIK.solver.leftArm.bendGoalWeight = (m_trackElbows ? 1f : 0f);
m_leftTargetActive = true; m_leftTargetActive = true;
} }
@ -107,7 +107,7 @@ namespace ml_lme
if(l_data.m_rightHand.m_present && !m_rightTargetActive) if(l_data.m_rightHand.m_present && !m_rightTargetActive)
{ {
m_vrIK.solver.rightArm.target = m_rightHandTarget; m_vrIK.solver.rightArm.target = m_rightHandTarget;
m_vrIK.solver.rightArm.bendGoal = LeapTracking.GetInstance().GetRightElbow(); m_vrIK.solver.rightArm.bendGoal = LeapTracking.Instance.GetRightElbow();
m_vrIK.solver.rightArm.bendGoalWeight = (m_trackElbows ? 1f : 0f); m_vrIK.solver.rightArm.bendGoalWeight = (m_trackElbows ? 1f : 0f);
m_rightTargetActive = true; m_rightTargetActive = true;
} }
@ -126,7 +126,7 @@ namespace ml_lme
{ {
if(m_enabled && !m_inVR && (m_poseHandler != null)) if(m_enabled && !m_inVR && (m_poseHandler != null))
{ {
GestureMatcher.LeapData l_data = LeapManager.GetInstance().GetLatestData(); GestureMatcher.LeapData l_data = LeapManager.Instance.GetLatestData();
Vector3 l_hipsLocalPos = m_hips.localPosition; Vector3 l_hipsLocalPos = m_hips.localPosition;
Quaternion l_hipsLocalRot = m_hips.localRotation; Quaternion l_hipsLocalRot = m_hips.localRotation;
@ -281,7 +281,7 @@ namespace ml_lme
PlayerSetup.Instance._animator.transform PlayerSetup.Instance._animator.transform
); );
m_leftArmIK.solver.arm.target = m_leftHandTarget; m_leftArmIK.solver.arm.target = m_leftHandTarget;
m_leftArmIK.solver.arm.bendGoal = LeapTracking.GetInstance().GetLeftElbow(); m_leftArmIK.solver.arm.bendGoal = LeapTracking.Instance.GetLeftElbow();
m_leftArmIK.solver.arm.bendGoalWeight = (m_trackElbows ? 1f : 0f); m_leftArmIK.solver.arm.bendGoalWeight = (m_trackElbows ? 1f : 0f);
m_leftArmIK.enabled = (m_enabled && !m_fingersOnly); m_leftArmIK.enabled = (m_enabled && !m_fingersOnly);
@ -296,7 +296,7 @@ namespace ml_lme
PlayerSetup.Instance._animator.transform PlayerSetup.Instance._animator.transform
); );
m_rightArmIK.solver.arm.target = m_rightHandTarget; m_rightArmIK.solver.arm.target = m_rightHandTarget;
m_rightArmIK.solver.arm.bendGoal = LeapTracking.GetInstance().GetRightElbow(); m_rightArmIK.solver.arm.bendGoal = LeapTracking.Instance.GetRightElbow();
m_rightArmIK.solver.arm.bendGoalWeight = (m_trackElbows ? 1f : 0f); m_rightArmIK.solver.arm.bendGoalWeight = (m_trackElbows ? 1f : 0f);
m_rightArmIK.enabled = (m_enabled && !m_fingersOnly); m_rightArmIK.enabled = (m_enabled && !m_fingersOnly);

View file

@ -7,7 +7,7 @@ namespace ml_lme
[DisallowMultipleComponent] [DisallowMultipleComponent]
class LeapTracking : MonoBehaviour class LeapTracking : MonoBehaviour
{ {
static LeapTracking ms_instance = null; public static LeapTracking Instance { get; private set; } = null;
static Quaternion ms_dummyRotation = Quaternion.identity; static Quaternion ms_dummyRotation = Quaternion.identity;
static readonly Quaternion ms_hmdRotation = new Quaternion(0f, 0.7071068f, 0.7071068f, 0f); static readonly Quaternion ms_hmdRotation = new Quaternion(0f, 0.7071068f, 0.7071068f, 0f);
static readonly Quaternion ms_screentopRotation = new Quaternion(0f, 0f, -1f, 0f); static readonly Quaternion ms_screentopRotation = new Quaternion(0f, 0f, -1f, 0f);
@ -25,12 +25,10 @@ namespace ml_lme
float m_scaleRelation = 1f; float m_scaleRelation = 1f;
public static LeapTracking GetInstance() => ms_instance;
void Start() void Start()
{ {
if(ms_instance == null) if(Instance == null)
ms_instance = this; Instance = this;
m_inVR = Utils.IsInVR(); m_inVR = Utils.IsInVR();
@ -101,8 +99,8 @@ namespace ml_lme
void OnDestroy() void OnDestroy()
{ {
if(ms_instance == this) if(Instance == this)
ms_instance = null; Instance = null;
Settings.DesktopOffsetChange -= this.OnDesktopOffsetChange; Settings.DesktopOffsetChange -= this.OnDesktopOffsetChange;
Settings.ModelVisibilityChange -= this.OnModelVisibilityChange; Settings.ModelVisibilityChange -= this.OnModelVisibilityChange;
@ -116,7 +114,7 @@ namespace ml_lme
{ {
if(Settings.Enabled) if(Settings.Enabled)
{ {
GestureMatcher.LeapData l_data = LeapManager.GetInstance().GetLatestData(); GestureMatcher.LeapData l_data = LeapManager.Instance.GetLatestData();
if(l_data.m_leftHand.m_present) if(l_data.m_leftHand.m_present)
{ {

View file

@ -1,10 +1,6 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyTitle("LeapMotionExtension")] [assembly: MelonLoader.MelonInfo(typeof(ml_lme.LeapMotionExtension), "LeapMotionExtension", "1.4.0", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: AssemblyVersion("1.3.9")]
[assembly: AssemblyFileVersion("1.3.9")]
[assembly: MelonLoader.MelonInfo(typeof(ml_lme.LeapMotionExtension), "LeapMotionExtension", "1.3.9", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: MelonLoader.MelonGame(null, "ChilloutVR")] [assembly: MelonLoader.MelonGame(null, "ChilloutVR")]
[assembly: MelonLoader.MelonOptionalDependencies("ml_pmc")] [assembly: MelonLoader.MelonOptionalDependencies("ml_pmc")]
[assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] [assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]

View file

@ -1,6 +1,7 @@
using ABI_RC.Core.Player; using ABI_RC.Core.Player;
using ABI_RC.Core.Savior; using ABI_RC.Core.Savior;
using ABI_RC.Core.UI; using ABI_RC.Core.UI;
using ABI_RC.Systems.InputManagement;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
@ -9,15 +10,10 @@ namespace ml_lme
{ {
static class Utils static class Utils
{ {
static readonly Quaternion ms_hmdRotationFix = new Quaternion(0f, 0.7071068f, 0.7071068f, 0f);
static readonly Quaternion ms_screentopRotationFix = new Quaternion(0f, 0f, -1f, 0f);
static readonly FieldInfo ms_indexGestureToggle = typeof(InputModuleSteamVR).GetField("_steamVrIndexGestureToggleValue", BindingFlags.Instance | BindingFlags.NonPublic);
public static bool IsInVR() => ((CheckVR.Instance != null) && CheckVR.Instance.hasVrDeviceLoaded); public static bool IsInVR() => ((CheckVR.Instance != null) && CheckVR.Instance.hasVrDeviceLoaded);
public static bool AreKnucklesInUse() => PlayerSetup.Instance._trackerManager.trackerNames.Contains("knuckles"); public static bool AreKnucklesInUse() => ((CVRInputManager.Instance._leftController == ABI_RC.Systems.InputManagement.XR.EXRControllerType.Index) || (CVRInputManager.Instance._rightController == ABI_RC.Systems.InputManagement.XR.EXRControllerType.Index));
public static bool GetIndexGestureToggle(this InputModuleSteamVR p_module) => (bool)ms_indexGestureToggle.GetValue(p_module); public static bool IsLeftHandTracked() => (CVRInputManager.Instance._leftController != ABI_RC.Systems.InputManagement.XR.EXRControllerType.None);
public static bool IsLeftHandTracked() => ((VRTrackerManager.Instance.leftHand != null) && VRTrackerManager.Instance.leftHand.active); public static bool IsRightHandTracked() => (CVRInputManager.Instance._rightController != ABI_RC.Systems.InputManagement.XR.EXRControllerType.None);
public static bool IsRightHandTracked() => ((VRTrackerManager.Instance.rightHand != null) && VRTrackerManager.Instance.rightHand.active);
public static Matrix4x4 GetMatrix(this Transform p_transform, bool p_pos = true, bool p_rot = true, bool p_scl = false) public static Matrix4x4 GetMatrix(this Transform p_transform, bool p_pos = true, bool p_rot = true, bool p_scl = false)
{ {

View file

@ -1,150 +1,99 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>netstandard2.1</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platforms>x64</Platforms>
<ProjectGuid>{83CC74B7-F444-40E1-BD06-67CEC995A919}</ProjectGuid> <PackageId>LeapMotionExtension</PackageId>
<OutputType>Library</OutputType> <Version>1.4.0</Version>
<AppDesignerFolder>Properties</AppDesignerFolder> <Authors>SDraw</Authors>
<RootNamespace>ml_lme</RootNamespace> <Company>None</Company>
<AssemblyName>ml_lme</AssemblyName> <Product>LeapMotionExtension</Product>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutputPath>bin\x64\Debug\</OutputPath> <DebugType>none</DebugType>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DebugSymbols>false</DebugSymbols>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="0Harmony, Version=2.9.0.0, Culture=neutral, processorArchitecture=MSIL"> <Compile Remove="vendor\LeapSDK\**" />
<SpecificVersion>False</SpecificVersion> <EmbeddedResource Remove="vendor\LeapSDK\**" />
<HintPath>C:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\0Harmony.dll</HintPath> <None Remove="vendor\LeapSDK\**" />
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>C:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>C:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="cohtml.Net">
<Private>False</Private>
</Reference>
<Reference Include="Cohtml.Runtime">
<Private>False</Private>
</Reference>
<Reference Include="MelonLoader">
<HintPath>C:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ml_pmc">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\Mods\ml_pmc.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>C:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.AnimationModule">
<HintPath>C:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.AssetBundleModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>C:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="AssetsHandler.cs" /> <None Remove="LeapMotionExtension.json" />
<Compile Include="DependenciesHandler.cs" /> <None Remove="resources\leapmotion_controller.asset" />
<Compile Include="GestureMatcher.cs" /> <None Remove="resources\leapmotion_hands.asset" />
<Compile Include="LeapInput.cs" /> <None Remove="resources\menu.js" />
<Compile Include="LeapManager.cs" />
<Compile Include="LeapTracked.cs" />
<Compile Include="LeapTracking.cs" />
<Compile Include="Main.cs" />
<Compile Include="ModSupporter.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Scripts.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Utils.cs" />
<Compile Include="vendor\LeapCSharp\Arm.cs" />
<Compile Include="vendor\LeapCSharp\Bone.cs" />
<Compile Include="vendor\LeapCSharp\CircularObjectBuffer.cs" />
<Compile Include="vendor\LeapCSharp\Config.cs" />
<Compile Include="vendor\LeapCSharp\Connection.cs" />
<Compile Include="vendor\LeapCSharp\Controller.cs" />
<Compile Include="vendor\LeapCSharp\CopyFromLeapCExtensions.cs" />
<Compile Include="vendor\LeapCSharp\CopyFromOtherExtensions.cs" />
<Compile Include="vendor\LeapCSharp\CSharpExtensions.cs" />
<Compile Include="vendor\LeapCSharp\Device.cs" />
<Compile Include="vendor\LeapCSharp\DeviceList.cs" />
<Compile Include="vendor\LeapCSharp\DistortionData.cs" />
<Compile Include="vendor\LeapCSharp\Events.cs" />
<Compile Include="vendor\LeapCSharp\FailedDevice.cs" />
<Compile Include="vendor\LeapCSharp\FailedDeviceList.cs" />
<Compile Include="vendor\LeapCSharp\Finger.cs" />
<Compile Include="vendor\LeapCSharp\Frame.cs" />
<Compile Include="vendor\LeapCSharp\Hand.cs" />
<Compile Include="vendor\LeapCSharp\IController.cs" />
<Compile Include="vendor\LeapCSharp\Image.cs" />
<Compile Include="vendor\LeapCSharp\ImageData.cs" />
<Compile Include="vendor\LeapCSharp\LeapC.cs" />
<Compile Include="vendor\LeapCSharp\LeapTransform.cs" />
<Compile Include="vendor\LeapCSharp\Logger.cs" />
<Compile Include="vendor\LeapCSharp\MemoryManager.cs" />
<Compile Include="vendor\LeapCSharp\MessageSeverity.cs" />
<Compile Include="vendor\LeapCSharp\PointMapping.cs" />
<Compile Include="vendor\LeapCSharp\StructMarshal.cs" />
<Compile Include="vendor\LeapCSharp\TransformExtensions.cs" />
<Compile Include="VisualHand.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="resources\leapmotion_controller.asset" />
<EmbeddedResource Include="resources\leapmotion_hands.asset" />
<EmbeddedResource Include="resources\menu.js" />
<EmbeddedResource Include="vendor\LeapSDK\lib\x64\LeapC.dll"> <EmbeddedResource Include="vendor\LeapSDK\lib\x64\LeapC.dll">
<Link>LeapC.dll</Link> <Link>LeapC.dll</Link>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="resources\leapmotion_controller.asset" /> <Reference Include="0Harmony">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\0Harmony.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="cohtml.Net">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\cohtml.Net.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Cohtml.Runtime">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Cohtml.Runtime.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="MelonLoader">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\MelonLoader.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ml_pmc">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\Mods\ml_pmc.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.AnimationModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.AssetBundleModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.XRModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.XRModule.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="resources\menu.js" /> <Folder Include="vendor\LeapCSharp\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="resources\leapmotion_hands.asset" /> <Target Name="PostBuild" AfterTargets="PostBuildEvent">
</ItemGroup> <Exec Command="copy /y &quot;$(TargetPath)&quot; &quot;D:\Games\Steam\steamapps\common\ChilloutVR\Mods\&quot;" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Target>
<PropertyGroup>
<PostBuildEvent>copy /y "$(TargetPath)" "D:\Games\Steam\steamapps\common\ChilloutVR\Mods\"</PostBuildEvent> </Project>
</PropertyGroup>
</Project>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ReferencePath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\;D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\</ReferencePath>
</PropertyGroup>
</Project>

View file

@ -400,7 +400,7 @@ function inp_dropdown_mod_lme(_obj, _callbackName) {
</div> </div>
<div class ="row-wrapper"> <div class ="row-wrapper">
<div class ="option-caption">Recognize gestures: </div> <div class ="option-caption">Recognize Gestures: </div>
<div class ="option-input"> <div class ="option-input">
<div id="Gestures" class ="inp_toggle no-scroll" data-current="false"></div> <div id="Gestures" class ="inp_toggle no-scroll" data-current="false"></div>
</div> </div>

View file

@ -1,23 +1,30 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio Version 16
VisualStudioVersion = 15.0.28307.1738 VisualStudioVersion = 16.0.33214.272
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ml_lme", "ml_lme\ml_lme.csproj", "{83CC74B7-F444-40E1-BD06-67CEC995A919}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_amt", "ml_amt\ml_amt.csproj", "{714806A3-E6FC-46F6-9D1D-89C77FEBAF06}"
ProjectSection(ProjectDependencies) = postProject
{D27B6D36-884F-4A49-9A25-B9C121E7B65F} = {D27B6D36-884F-4A49-9A25-B9C121E7B65F}
{118675AA-9AC7-4B0C-BFB1-FA1691619502} = {118675AA-9AC7-4B0C-BFB1-FA1691619502}
EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ml_drs", "ml_drs\ml_drs.csproj", "{06CD5155-4459-48C3-8A53-E0B91136351B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_dht", "ml_dht\ml_dht.csproj", "{D805BA67-067E-4B79-87FC-6B08973F13EE}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ml_amt", "ml_amt\ml_amt.csproj", "{74E13D02-A506-41A2-A2CF-C8B3D5B1E452}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_drs", "ml_drs\ml_drs.csproj", "{47B2BE27-B238-4135-AE17-9195884FDD8F}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ml_dht", "ml_dht\ml_dht.csproj", "{6DD89FC3-A974-4C39-A3EE-F60C24B17B5B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_egn", "ml_egn\ml_egn.csproj", "{8B05FAC0-5C12-40CA-BA48-9F55923E8135}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ml_egn", "ml_egn\ml_egn.csproj", "{1B5ACA07-6266-4C9A-BA30-D4BBE6634846}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_lme", "ml_lme\ml_lme.csproj", "{77EA76B1-3709-4FC5-BDBD-8F77160E6DA3}"
ProjectSection(ProjectDependencies) = postProject
{118675AA-9AC7-4B0C-BFB1-FA1691619502} = {118675AA-9AC7-4B0C-BFB1-FA1691619502}
EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ml_pam", "ml_pam\ml_pam.csproj", "{3B5028DE-8C79-40DF-A1EF-BDB29D366125}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_pam", "ml_pam\ml_pam.csproj", "{5B614459-234A-443D-B06D-34FF81ADA67E}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ml_prm", "ml_prm\ml_prm.csproj", "{ABD2A720-2DE8-4EB3-BFC2-8F1C3D2ADA15}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_prm", "ml_prm\ml_prm.csproj", "{D27B6D36-884F-4A49-9A25-B9C121E7B65F}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ml_pmc", "ml_pmc\ml_pmc.csproj", "{758514D3-6E1A-4E05-A156-B4E5C74AB5C4}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ml_pmc", "ml_pmc\ml_pmc.csproj", "{118675AA-9AC7-4B0C-BFB1-FA1691619502}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -25,38 +32,30 @@ Global
Release|x64 = Release|x64 Release|x64 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{83CC74B7-F444-40E1-BD06-67CEC995A919}.Debug|x64.ActiveCfg = Debug|x64 {714806A3-E6FC-46F6-9D1D-89C77FEBAF06}.Debug|x64.ActiveCfg = Debug|x64
{83CC74B7-F444-40E1-BD06-67CEC995A919}.Debug|x64.Build.0 = Debug|x64 {714806A3-E6FC-46F6-9D1D-89C77FEBAF06}.Release|x64.ActiveCfg = Release|x64
{83CC74B7-F444-40E1-BD06-67CEC995A919}.Release|x64.ActiveCfg = Release|x64 {714806A3-E6FC-46F6-9D1D-89C77FEBAF06}.Release|x64.Build.0 = Release|x64
{83CC74B7-F444-40E1-BD06-67CEC995A919}.Release|x64.Build.0 = Release|x64 {D805BA67-067E-4B79-87FC-6B08973F13EE}.Debug|x64.ActiveCfg = Debug|x64
{06CD5155-4459-48C3-8A53-E0B91136351B}.Debug|x64.ActiveCfg = Debug|x64 {D805BA67-067E-4B79-87FC-6B08973F13EE}.Release|x64.ActiveCfg = Release|x64
{06CD5155-4459-48C3-8A53-E0B91136351B}.Debug|x64.Build.0 = Debug|x64 {D805BA67-067E-4B79-87FC-6B08973F13EE}.Release|x64.Build.0 = Release|x64
{06CD5155-4459-48C3-8A53-E0B91136351B}.Release|x64.ActiveCfg = Release|x64 {47B2BE27-B238-4135-AE17-9195884FDD8F}.Debug|x64.ActiveCfg = Debug|x64
{06CD5155-4459-48C3-8A53-E0B91136351B}.Release|x64.Build.0 = Release|x64 {47B2BE27-B238-4135-AE17-9195884FDD8F}.Release|x64.ActiveCfg = Release|x64
{74E13D02-A506-41A2-A2CF-C8B3D5B1E452}.Debug|x64.ActiveCfg = Debug|x64 {47B2BE27-B238-4135-AE17-9195884FDD8F}.Release|x64.Build.0 = Release|x64
{74E13D02-A506-41A2-A2CF-C8B3D5B1E452}.Debug|x64.Build.0 = Debug|x64 {8B05FAC0-5C12-40CA-BA48-9F55923E8135}.Debug|x64.ActiveCfg = Debug|x64
{74E13D02-A506-41A2-A2CF-C8B3D5B1E452}.Release|x64.ActiveCfg = Release|x64 {8B05FAC0-5C12-40CA-BA48-9F55923E8135}.Release|x64.ActiveCfg = Release|x64
{74E13D02-A506-41A2-A2CF-C8B3D5B1E452}.Release|x64.Build.0 = Release|x64 {8B05FAC0-5C12-40CA-BA48-9F55923E8135}.Release|x64.Build.0 = Release|x64
{6DD89FC3-A974-4C39-A3EE-F60C24B17B5B}.Debug|x64.ActiveCfg = Debug|x64 {77EA76B1-3709-4FC5-BDBD-8F77160E6DA3}.Debug|x64.ActiveCfg = Debug|x64
{6DD89FC3-A974-4C39-A3EE-F60C24B17B5B}.Debug|x64.Build.0 = Debug|x64 {77EA76B1-3709-4FC5-BDBD-8F77160E6DA3}.Release|x64.ActiveCfg = Release|x64
{6DD89FC3-A974-4C39-A3EE-F60C24B17B5B}.Release|x64.ActiveCfg = Release|x64 {77EA76B1-3709-4FC5-BDBD-8F77160E6DA3}.Release|x64.Build.0 = Release|x64
{6DD89FC3-A974-4C39-A3EE-F60C24B17B5B}.Release|x64.Build.0 = Release|x64 {5B614459-234A-443D-B06D-34FF81ADA67E}.Debug|x64.ActiveCfg = Debug|x64
{1B5ACA07-6266-4C9A-BA30-D4BBE6634846}.Debug|x64.ActiveCfg = Debug|x64 {5B614459-234A-443D-B06D-34FF81ADA67E}.Release|x64.ActiveCfg = Release|x64
{1B5ACA07-6266-4C9A-BA30-D4BBE6634846}.Debug|x64.Build.0 = Debug|x64 {5B614459-234A-443D-B06D-34FF81ADA67E}.Release|x64.Build.0 = Release|x64
{1B5ACA07-6266-4C9A-BA30-D4BBE6634846}.Release|x64.ActiveCfg = Release|x64 {D27B6D36-884F-4A49-9A25-B9C121E7B65F}.Debug|x64.ActiveCfg = Debug|x64
{1B5ACA07-6266-4C9A-BA30-D4BBE6634846}.Release|x64.Build.0 = Release|x64 {D27B6D36-884F-4A49-9A25-B9C121E7B65F}.Release|x64.ActiveCfg = Release|x64
{3B5028DE-8C79-40DF-A1EF-BDB29D366125}.Debug|x64.ActiveCfg = Debug|x64 {D27B6D36-884F-4A49-9A25-B9C121E7B65F}.Release|x64.Build.0 = Release|x64
{3B5028DE-8C79-40DF-A1EF-BDB29D366125}.Debug|x64.Build.0 = Debug|x64 {118675AA-9AC7-4B0C-BFB1-FA1691619502}.Debug|x64.ActiveCfg = Debug|x64
{3B5028DE-8C79-40DF-A1EF-BDB29D366125}.Release|x64.ActiveCfg = Release|x64 {118675AA-9AC7-4B0C-BFB1-FA1691619502}.Release|x64.ActiveCfg = Release|x64
{3B5028DE-8C79-40DF-A1EF-BDB29D366125}.Release|x64.Build.0 = Release|x64 {118675AA-9AC7-4B0C-BFB1-FA1691619502}.Release|x64.Build.0 = Release|x64
{ABD2A720-2DE8-4EB3-BFC2-8F1C3D2ADA15}.Debug|x64.ActiveCfg = Debug|x64
{ABD2A720-2DE8-4EB3-BFC2-8F1C3D2ADA15}.Debug|x64.Build.0 = Debug|x64
{ABD2A720-2DE8-4EB3-BFC2-8F1C3D2ADA15}.Release|x64.ActiveCfg = Release|x64
{ABD2A720-2DE8-4EB3-BFC2-8F1C3D2ADA15}.Release|x64.Build.0 = Release|x64
{758514D3-6E1A-4E05-A156-B4E5C74AB5C4}.Debug|x64.ActiveCfg = Debug|x64
{758514D3-6E1A-4E05-A156-B4E5C74AB5C4}.Debug|x64.Build.0 = Debug|x64
{758514D3-6E1A-4E05-A156-B4E5C74AB5C4}.Release|x64.ActiveCfg = Release|x64
{758514D3-6E1A-4E05-A156-B4E5C74AB5C4}.Release|x64.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View file

@ -1,10 +1,6 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyTitle("PickupArmMovement")] [assembly: MelonLoader.MelonInfo(typeof(ml_pam.PickupArmMovement), "PickupArmMovement", "1.0.6", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: AssemblyVersion("1.0.5")]
[assembly: AssemblyFileVersion("1.0.5")]
[assembly: MelonLoader.MelonInfo(typeof(ml_pam.PickupArmMovement), "PickupArmMovement", "1.0.5", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: MelonLoader.MelonGame(null, "ChilloutVR")] [assembly: MelonLoader.MelonGame(null, "ChilloutVR")]
[assembly: MelonLoader.MelonPriority(1)] [assembly: MelonLoader.MelonPriority(1)]
[assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] [assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]

View file

@ -1,4 +1,6 @@
using UnityEngine; using ABI_RC.Core.UI;
using System.Reflection;
using UnityEngine;
namespace ml_pam namespace ml_pam
{ {

View file

@ -1,90 +1,70 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>netstandard2.1</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platforms>x64</Platforms>
<ProjectGuid>{3B5028DE-8C79-40DF-A1EF-BDB29D366125}</ProjectGuid> <PackageId>PickupArmMovement</PackageId>
<OutputType>Library</OutputType> <Version>1.0.6</Version>
<AppDesignerFolder>Properties</AppDesignerFolder> <Authors>SDraw</Authors>
<RootNamespace>ml_pam</RootNamespace> <Company>None</Company>
<AssemblyName>ml_pam</AssemblyName> <Product>PickupArmMovement</Product>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutputPath>bin\x64\Debug\</OutputPath> <DebugType>none</DebugType>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DebugSymbols>false</DebugSymbols>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="0Harmony, Version=2.9.0.0, Culture=neutral, processorArchitecture=MSIL"> <None Remove="PickupArmMovement.json" />
<SpecificVersion>False</SpecificVersion> <None Remove="resources\menu.js" />
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="cohtml.Net">
<Private>False</Private>
</Reference>
<Reference Include="Cohtml.Runtime">
<Private>False</Private>
</Reference>
<Reference Include="MelonLoader, Version=0.5.7.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine.AnimationModule">
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ArmMover.cs" />
<Compile Include="Main.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Scripts.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Utils.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="resources\menu.js" /> <EmbeddedResource Include="resources\menu.js" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <ItemGroup>
<PostBuildEvent>copy /y "$(TargetPath)" "D:\Games\Steam\steamapps\common\ChilloutVR\Mods\"</PostBuildEvent> <Reference Include="0Harmony">
</PropertyGroup> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\0Harmony.dll</HintPath>
</Project> <Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="cohtml.Net">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\cohtml.Net.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Cohtml.Runtime">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Cohtml.Runtime.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="MelonLoader">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\MelonLoader.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.AnimationModule">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy /y &quot;$(TargetPath)&quot; &quot;D:\Games\Steam\steamapps\common\ChilloutVR\Mods\&quot;" />
</Target>
</Project>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ReferencePath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\;D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\</ReferencePath>
</PropertyGroup>
</Project>

View file

@ -2,6 +2,7 @@
using ABI_RC.Core.Savior; using ABI_RC.Core.Savior;
using ABI_RC.Systems.IK; using ABI_RC.Systems.IK;
using ABI_RC.Systems.IK.SubSystems; using ABI_RC.Systems.IK.SubSystems;
using ABI_RC.Systems.InputManagement;
using ABI_RC.Systems.MovementSystem; using ABI_RC.Systems.MovementSystem;
using RootMotion.FinalIK; using RootMotion.FinalIK;
using UnityEngine; using UnityEngine;
@ -81,17 +82,6 @@ namespace ml_pmc
CVRInputManager.Instance.fingerCurlRightMiddle = l_curls[l_mirror ? 2 : 7]; CVRInputManager.Instance.fingerCurlRightMiddle = l_curls[l_mirror ? 2 : 7];
CVRInputManager.Instance.fingerCurlRightRing = l_curls[l_mirror ? 3 : 8]; CVRInputManager.Instance.fingerCurlRightRing = l_curls[l_mirror ? 3 : 8];
CVRInputManager.Instance.fingerCurlRightPinky = l_curls[l_mirror ? 4 : 9]; CVRInputManager.Instance.fingerCurlRightPinky = l_curls[l_mirror ? 4 : 9];
IKSystem.Instance.FingerSystem.leftThumbCurl = l_curls[l_mirror ? 5 : 0];
IKSystem.Instance.FingerSystem.leftIndexCurl = l_curls[l_mirror ? 6 : 1];
IKSystem.Instance.FingerSystem.leftMiddleCurl = l_curls[l_mirror ? 7 : 2];
IKSystem.Instance.FingerSystem.leftRingCurl = l_curls[l_mirror ? 8 : 3];
IKSystem.Instance.FingerSystem.leftPinkyCurl = l_curls[l_mirror ? 9 : 4];
IKSystem.Instance.FingerSystem.rightThumbCurl = l_curls[l_mirror ? 0 : 5];
IKSystem.Instance.FingerSystem.rightIndexCurl = l_curls[l_mirror ? 1 : 6];
IKSystem.Instance.FingerSystem.rightMiddleCurl = l_curls[l_mirror ? 2 : 7];
IKSystem.Instance.FingerSystem.rightRingCurl = l_curls[l_mirror ? 3 : 8];
IKSystem.Instance.FingerSystem.rightPinkyCurl = l_curls[l_mirror ? 4 : 9];
} }
else else
{ {
@ -290,7 +280,7 @@ namespace ml_pmc
} }
void RestoreFingerTracking() void RestoreFingerTracking()
{ {
CVRInputManager.Instance.individualFingerTracking = (m_inVr && Utils.AreKnucklesInUse() && !Utils.GetIndexGestureToggle()); CVRInputManager.Instance.individualFingerTracking = (m_inVr && Utils.AreKnucklesInUse() && !CVRInputManager._moduleXR.GestureToggleValue);
IKSystem.Instance.FingerSystem.controlActive = CVRInputManager.Instance.individualFingerTracking; IKSystem.Instance.FingerSystem.controlActive = CVRInputManager.Instance.individualFingerTracking;
if(!CVRInputManager.Instance.individualFingerTracking) if(!CVRInputManager.Instance.individualFingerTracking)
@ -305,17 +295,6 @@ namespace ml_pmc
CVRInputManager.Instance.fingerCurlRightMiddle = 0f; CVRInputManager.Instance.fingerCurlRightMiddle = 0f;
CVRInputManager.Instance.fingerCurlRightRing = 0f; CVRInputManager.Instance.fingerCurlRightRing = 0f;
CVRInputManager.Instance.fingerCurlRightPinky = 0f; CVRInputManager.Instance.fingerCurlRightPinky = 0f;
IKSystem.Instance.FingerSystem.leftThumbCurl = 0f;
IKSystem.Instance.FingerSystem.leftIndexCurl = 0f;
IKSystem.Instance.FingerSystem.leftMiddleCurl = 0f;
IKSystem.Instance.FingerSystem.leftRingCurl = 0f;
IKSystem.Instance.FingerSystem.leftPinkyCurl = 0f;
IKSystem.Instance.FingerSystem.rightThumbCurl = 0f;
IKSystem.Instance.FingerSystem.rightIndexCurl = 0f;
IKSystem.Instance.FingerSystem.rightMiddleCurl = 0f;
IKSystem.Instance.FingerSystem.rightRingCurl = 0f;
IKSystem.Instance.FingerSystem.rightPinkyCurl = 0f;
} }
} }
} }

View file

@ -1,10 +1,6 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyTitle("PlayerMovementCopycat")] [assembly: MelonLoader.MelonInfo(typeof(ml_pmc.PlayerMovementCopycat), "PlayerMovementCopycat", "1.0.1", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: MelonLoader.MelonInfo(typeof(ml_pmc.PlayerMovementCopycat), "PlayerMovementCopycat", "1.0.0", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: MelonLoader.MelonGame(null, "ChilloutVR")] [assembly: MelonLoader.MelonGame(null, "ChilloutVR")]
[assembly: MelonLoader.MelonPriority(3)] [assembly: MelonLoader.MelonPriority(3)]
[assembly: MelonLoader.MelonAdditionalDependencies("BTKUILib")] [assembly: MelonLoader.MelonAdditionalDependencies("BTKUILib")]

View file

@ -1,6 +1,7 @@
using ABI.CCK.Components; using ABI.CCK.Components;
using ABI_RC.Core.Player; using ABI_RC.Core.Player;
using ABI_RC.Core.Savior; using ABI_RC.Core.Savior;
using ABI_RC.Systems.InputManagement;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
@ -9,8 +10,6 @@ namespace ml_pmc
{ {
static class Utils static class Utils
{ {
static readonly FieldInfo ms_indexGestureToggle = typeof(InputModuleSteamVR).GetField("_steamVrIndexGestureToggleValue", BindingFlags.Instance | BindingFlags.NonPublic);
static readonly (int, int)[] ms_sideMuscles = new (int, int)[] static readonly (int, int)[] ms_sideMuscles = new (int, int)[]
{ {
(29,21), (30,22), (31,23), (32,24), (33,25), (34,26), (35,27), (36,28), (29,21), (30,22), (31,23), (32,24), (33,25), (34,26), (35,27), (36,28),
@ -21,8 +20,7 @@ namespace ml_pmc
static readonly int[] ms_centralMuscles = new int[] { 1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 18, 20 }; static readonly int[] ms_centralMuscles = new int[] { 1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 18, 20 };
public static bool IsInVR() => ((CheckVR.Instance != null) && CheckVR.Instance.hasVrDeviceLoaded); public static bool IsInVR() => ((CheckVR.Instance != null) && CheckVR.Instance.hasVrDeviceLoaded);
public static bool AreKnucklesInUse() => PlayerSetup.Instance._trackerManager.trackerNames.Contains("knuckles"); public static bool AreKnucklesInUse() => ((CVRInputManager.Instance._leftController == ABI_RC.Systems.InputManagement.XR.EXRControllerType.Index) || (CVRInputManager.Instance._rightController == ABI_RC.Systems.InputManagement.XR.EXRControllerType.Index));
public static bool GetIndexGestureToggle() => (bool)ms_indexGestureToggle.GetValue(CVRInputManager.Instance.GetComponent<InputModuleSteamVR>());
public static bool IsWorldSafe() => ((CVRWorld.Instance != null) && CVRWorld.Instance.allowFlying); public static bool IsWorldSafe() => ((CVRWorld.Instance != null) && CVRWorld.Instance.allowFlying);
public static bool IsCombatSafe() => ((CombatSystem.Instance == null) || !CombatSystem.Instance.isDown); public static bool IsCombatSafe() => ((CombatSystem.Instance == null) || !CombatSystem.Instance.isDown);

View file

@ -1,101 +1,66 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>netstandard2.1</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platforms>x64</Platforms>
<ProjectGuid>{758514D3-6E1A-4E05-A156-B4E5C74AB5C4}</ProjectGuid> <PackageId>PlayerMovementCopycat</PackageId>
<OutputType>Library</OutputType> <Authors>SDraw</Authors>
<AppDesignerFolder>Properties</AppDesignerFolder> <Company>None</Company>
<RootNamespace>ml_pmc</RootNamespace> <Product>PlayerMovementCopycat</Product>
<AssemblyName>ml_pmc</AssemblyName> <Version>1.0.1</Version>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy /y &quot;$(TargetPath)&quot; &quot;D:\Games\Steam\steamapps\common\ChilloutVR\Mods\&quot;" />
</Target>
<ItemGroup> <ItemGroup>
<Reference Include="0Harmony, Version=2.10.1.0, Culture=neutral, processorArchitecture=MSIL"> <None Remove="resources\dancing.png" />
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\0Harmony.dll</HintPath> <None Remove="resources\dancing_on.png" />
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="BTKUILib, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\Mods\BTKUILib.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="MelonLoader, Version=0.6.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\MelonLoader.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine.AnimationModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ModUi.cs" />
<Compile Include="Main.cs" />
<Compile Include="PoseCopycat.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="PuppetParser.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Utils.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="resources\dancing.png" /> <EmbeddedResource Include="resources\dancing.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="resources\dancing_on.png" /> <EmbeddedResource Include="resources\dancing_on.png" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <ItemGroup>
<PostBuildEvent>copy /y "$(TargetPath)" "D:\Games\Steam\steamapps\common\ChilloutVR\Mods\"</PostBuildEvent> <Reference Include="0Harmony">
</PropertyGroup> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\0Harmony.dll</HintPath>
</Project> <Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="BTKUILib">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\Mods\BTKUILib.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="MelonLoader">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\MelonLoader.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.AnimationModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
</Project>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ReferencePath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\;D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\;D:\Games\Steam\steamapps\common\ChilloutVR\Mods\</ReferencePath>
</PropertyGroup>
</Project>

View file

@ -1,10 +1,6 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyTitle("PlayerRagdollMod")] [assembly: MelonLoader.MelonInfo(typeof(ml_prm.PlayerRagdollMod), "PlayerRagdollMod", "1.0.6", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: AssemblyVersion("1.0.5")]
[assembly: AssemblyFileVersion("1.0.5")]
[assembly: MelonLoader.MelonInfo(typeof(ml_prm.PlayerRagdollMod), "PlayerRagdollMod", "1.0.5", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
[assembly: MelonLoader.MelonGame(null, "ChilloutVR")] [assembly: MelonLoader.MelonGame(null, "ChilloutVR")]
[assembly: MelonLoader.MelonPriority(2)] [assembly: MelonLoader.MelonPriority(2)]
[assembly: MelonLoader.MelonOptionalDependencies("BTKUILib")] [assembly: MelonLoader.MelonOptionalDependencies("BTKUILib")]

View file

@ -3,6 +3,7 @@ using ABI_RC.Core.InteractionSystem;
using ABI_RC.Core.Player; using ABI_RC.Core.Player;
using ABI_RC.Core.Savior; using ABI_RC.Core.Savior;
using ABI_RC.Systems.IK.SubSystems; using ABI_RC.Systems.IK.SubSystems;
using ABI_RC.Systems.InputManagement;
using ABI_RC.Systems.MovementSystem; using ABI_RC.Systems.MovementSystem;
using RootMotion.Dynamics; using RootMotion.Dynamics;
using RootMotion.FinalIK; using RootMotion.FinalIK;

View file

@ -1,146 +1,74 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>netstandard2.1</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platforms>x64</Platforms>
<ProjectGuid>{ABD2A720-2DE8-4EB3-BFC2-8F1C3D2ADA15}</ProjectGuid> <PackageId>PlayerRagdollMod</PackageId>
<OutputType>Library</OutputType> <Version>1.0.6</Version>
<AppDesignerFolder>Properties</AppDesignerFolder> <Authors>SDraw</Authors>
<RootNamespace>ml_prm</RootNamespace> <Company>None</Company>
<AssemblyName>ml_prm</AssemblyName> <Product>PlayerRagdollMod</Product>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="0Harmony, Version=2.9.0.0, Culture=neutral, processorArchitecture=MSIL"> <None Remove="PlayerRagdollMod.json" />
<SpecificVersion>False</SpecificVersion> <None Remove="resources\person.png" />
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\0Harmony.dll</HintPath> <None Remove="vendor\RootMotion\info.txt" />
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="BTKUILib">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\Mods\BTKUILib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="MelonLoader, Version=0.5.7.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine.AnimationModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.ClothModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.ClothModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AvatarBoolParameter.cs" />
<Compile Include="ModUi.cs" />
<Compile Include="RagdollTrigger.cs" />
<Compile Include="Main.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RagdollController.cs" />
<Compile Include="RagdollToggle.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Utils.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\AnimationBlocker.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Behaviours\BehaviourBase.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Behaviours\BehaviourFall.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Behaviours\BehaviourPuppet.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Behaviours\BehaviourPuppetBoosting.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Behaviours\BehaviourPuppetDamage.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Behaviours\BehaviourPuppetHelpers.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Behaviours\BehaviourPuppetStateSwitching.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Behaviours\BehaviourTemplate.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Behaviours\SubBehaviours\SubBehaviourBalancer.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Behaviours\SubBehaviours\SubBehaviourBase.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Behaviours\SubBehaviours\SubBehaviourCOM.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Booster.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\JointBreakBroadcaster.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Muscle.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\MuscleCollisionBroadcaster.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PhysXTools.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PressureSensor.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Prop.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PropMuscle.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PropRoot.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PropTemplate.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PuppetMaster.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PuppetMasterHierarchyAPI.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PuppetMasterHumanoidConfig.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PuppetMasterModes.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PuppetMasterMuscleAPI.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PuppetMasterProp.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PuppetMasterSettings.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PuppetMasterSetup.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PuppetMasterStates.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PuppetMasterTargetMappedState.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PuppetMasterTools.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\PuppetMasterValidation.cs" />
<Compile Include="vendor\RootMotion\PuppetMaster\Scripts\Weight.cs" />
<Compile Include="vendor\RootMotion\RagdollManager\Scripts\BipedRagdollCreator.cs" />
<Compile Include="vendor\RootMotion\RagdollManager\Scripts\BipedRagdollReferences.cs" />
<Compile Include="vendor\RootMotion\RagdollManager\Scripts\JointConverter.cs" />
<Compile Include="vendor\RootMotion\RagdollManager\Scripts\RagdollCreator.cs" />
<Compile Include="vendor\RootMotion\RagdollManager\Scripts\RagdollEditor.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="resources\person.png" /> <EmbeddedResource Include="resources\person.png" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <ItemGroup>
<PostBuildEvent>copy /y "$(TargetPath)" "D:\Games\Steam\steamapps\common\ChilloutVR\Mods\"</PostBuildEvent> <Reference Include="0Harmony">
</PropertyGroup> <HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\0Harmony.dll</HintPath>
</Project> <Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="BTKUILib">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\Mods\BTKUILib.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="MelonLoader">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\MelonLoader.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.AnimationModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.ClothModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.ClothModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>D:\games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy /y &quot;$(TargetPath)&quot; &quot;D:\Games\Steam\steamapps\common\ChilloutVR\Mods\&quot;" />
</Target>
</Project>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ReferencePath>D:\Games\Steam\steamapps\common\ChilloutVR\MelonLoader\net35\;D:\Games\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\;D:\Games\Steam\steamapps\common\ChilloutVR\Mods\</ReferencePath>
</PropertyGroup>
</Project>

View file

@ -1,2 +1 @@
* Buy https://assetstore.unity.com/packages/tools/physics/puppetmaster-48977 Put `PuppetMaster` and `RagdollMaster` folders from [PuppetMaster asset](https://assetstore.unity.com/packages/tools/physics/puppetmaster-48977) here.
* Put `PuppetMaster` and `RagdollManager` scripts in this folder