mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-05 04:36:13 -05:00
* Assets/UniHumanoid/Scripts => Assets/UniGLTF/Runtime/Humanoid * Assets/UniHumanoid/Editor => Assets/UniGLTF/Editor/Humanoid * Assets/UniHumanoid/Editor/Tests => Assets/UniGLTF/Tests/Humanoid * => docs/unihumanoid/index.md
34 lines
745 B
C#
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();
|
|
}
|
|
}
|
|
}
|