Scaled locomotion steps

Funny C# properties
Minor fixes
This commit is contained in:
SDraw 2023-03-03 00:44:17 +03:00
parent fc60219a4e
commit 28aca1bb49
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
11 changed files with 343 additions and 410 deletions

View file

@ -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 });
}
}
}