Files
2026-03-04 09:37:33 +08:00

47 lines
1.6 KiB
C#

using System;
using UnityEngine;
namespace RootMotion
{
[Serializable]
public class BipedLimbOrientations
{
[Serializable]
public class LimbOrientation
{
public Vector3 upperBoneForwardAxis;
public Vector3 lowerBoneForwardAxis;
public Vector3 lastBoneLeftAxis;
public LimbOrientation(Vector3 upperBoneForwardAxis, Vector3 lowerBoneForwardAxis, Vector3 lastBoneLeftAxis)
{
this.upperBoneForwardAxis = upperBoneForwardAxis;
this.lowerBoneForwardAxis = lowerBoneForwardAxis;
this.lastBoneLeftAxis = lastBoneLeftAxis;
}
}
public LimbOrientation leftArm;
public LimbOrientation rightArm;
public LimbOrientation leftLeg;
public LimbOrientation rightLeg;
public static BipedLimbOrientations UMA => new BipedLimbOrientations(new LimbOrientation(Vector3.forward, Vector3.forward, Vector3.forward), new LimbOrientation(Vector3.forward, Vector3.forward, Vector3.back), new LimbOrientation(Vector3.forward, Vector3.forward, Vector3.down), new LimbOrientation(Vector3.forward, Vector3.forward, Vector3.down));
public static BipedLimbOrientations MaxBiped => new BipedLimbOrientations(new LimbOrientation(Vector3.down, Vector3.down, Vector3.down), new LimbOrientation(Vector3.down, Vector3.down, Vector3.up), new LimbOrientation(Vector3.up, Vector3.up, Vector3.back), new LimbOrientation(Vector3.up, Vector3.up, Vector3.back));
public BipedLimbOrientations(LimbOrientation leftArm, LimbOrientation rightArm, LimbOrientation leftLeg, LimbOrientation rightLeg)
{
this.leftArm = leftArm;
this.rightArm = rightArm;
this.leftLeg = leftLeg;
this.rightLeg = rightLeg;
}
}
}