UniVRM/Assets/UniGLTF/UniHumanoid/Scripts/HumanPoseClip.cs
ousttrue 51dbcb76e5 MeshUtility を UniGLTF 下に移動
意図しない MeshUtility => UniGLTF 向きの参照が残っていて UPM が動作しなかった。次バージョンで予定していたファイル移動を繰り上げ
2021-01-06 20:20:14 +09:00

34 lines
745 B
C#

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