holopy3/Assets/UniGLTF/UniHumanoid/Scripts/HumanPoseClip.cs

34 lines
745 B
C#
Raw Permalink Normal View History

2021-01-28 12:07:52 +00:00
using UnityEngine;
namespace UniHumanoid
{
public class HumanPoseClip : ScriptableObject
{
public const string TPoseResourcePath = "T-Pose.pose";
public Vector3 bodyPosition;
public Quaternion bodyRotation;
public float[] muscles;
public HumanPose GetPose()
{
return new HumanPose
{
bodyPosition = bodyPosition,
bodyRotation = bodyRotation,
muscles = muscles
};
}
public void ApplyPose(ref HumanPose pose)
{
bodyPosition = pose.bodyPosition;
bodyRotation = pose.bodyRotation;
muscles = (float[])pose.muscles.Clone();
}
}
}