Animation Rigging 包可以在运行时为动画骨架启用程序化的运动,该示例项目演示了设置的工作流程步骤。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

28 行
633 B

using System.Collections.Generic;
using UnityEditor;
using Unity.Collections;
namespace UnityEngine.Animations.Rigging
{
static class ConstraintsUtils
{
public static List<Transform> ExtractChain(Transform root, Transform tip)
{
var chain = new List<Transform>();
if (!tip.IsChildOf(root))
return chain;
Transform tmp = tip;
while (tmp != root)
{
chain.Add(tmp);
tmp = tmp.parent;
}
chain.Add(root);
chain.Reverse();
return chain;
}
}
}