您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

26 行
765 B

using UnityEngine;
using UnityEngine.Experimental.Animations;
public struct FollowBoneJob : IAnimationJob
{
TransformStreamHandle m_BoneToFollow;
TransformSceneHandle m_SlavedTransform;
public void Setup(Animator animator, Transform boneToFollow, Transform slavedTransform)
{
m_BoneToFollow = animator.BindStreamTransform(boneToFollow);
m_SlavedTransform = animator.BindSceneTransform(slavedTransform);
}
public void ProcessAnimation(AnimationStream stream)
{
m_SlavedTransform.SetPosition(stream, m_BoneToFollow.GetPosition(stream));
m_SlavedTransform.SetRotation(stream, m_BoneToFollow.GetRotation(stream));
}
public void ProcessRootMotion(AnimationStream stream)
{
}
}