mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-04 19:09:23 +00:00
Scaled locomotion steps
Funny C# properties Minor fixes
This commit is contained in:
parent
fc60219a4e
commit
28aca1bb49
11 changed files with 343 additions and 410 deletions
|
@ -1,10 +1,12 @@
|
|||
using UnityEngine;
|
||||
using ABI_RC.Systems.IK;
|
||||
using System.Reflection;
|
||||
|
||||
namespace ml_amt
|
||||
{
|
||||
static class Utils
|
||||
{
|
||||
static MethodInfo ms_getSineKeyframes = typeof(RootMotion.FinalIK.IKSolverVR).GetMethod("GetSineKeyframes", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
|
||||
public static bool IsInVR() => ((ABI_RC.Core.Savior.CheckVR.Instance != null) && ABI_RC.Core.Savior.CheckVR.Instance.hasVrDeviceLoaded);
|
||||
|
||||
// Extensions
|
||||
|
@ -12,5 +14,10 @@ namespace ml_amt
|
|||
{
|
||||
return Matrix4x4.TRS(p_pos ? p_transform.position : Vector3.zero, p_rot ? p_transform.rotation : Quaternion.identity, p_scl ? p_transform.localScale : Vector3.one);
|
||||
}
|
||||
|
||||
public static Keyframe[] GetSineKeyframes(float p_mag)
|
||||
{
|
||||
return (Keyframe[])ms_getSineKeyframes.Invoke(null, new object[] { p_mag });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue