骨骼约束节点用于在动画流中,将目标骨骼(被约束骨骼)的 Position、Rotation 或 Scale 与源骨骼保持一致。通过该节点,可以实现被约束骨骼随源骨骼的变换而动态更新。
可添加约束类型共有以下六种,每种约束均可重复添加
| 约束类型 | 说明 |
|---|---|
| PositionConstraint | 约束骨骼的Position,相对于一个或多个源骨骼混合的Position |
| RotationConstraint | 约束骨骼的Rotation,相对于一个或多个源骨骼混合的Rotation |
| ScaleConstraint | 约束骨骼的Scale,相对于一个或多个源骨骼混合的Scale |
| AimConstraint | 约束骨骼的Rotation,使其朝向一个或多个源骨骼混合的Position |
| LookAtConstraint | 约束骨骼的Rotation,使其朝向一个或多个源骨骼混合的Position,简化的AimConstraint |
| ParentConstraint | 约束骨骼的Position和Rotation,使其表现为源骨骼的子对象 |

节点提供以下两类参数:
| 参数 | 说明 |
|---|---|
| Bone To Constrain | 需要被约束的骨骼,可选择场景中存在的骨骼,所选骨骼必须绑定于Avatar中 |
| Node Weight | 节点约束的Pose与输入Pose之间混合的权重 |
| Position Axis | 节点约束的Position轴, 仅在包含PositionConstraint或ParentConstraint时显示 |
| Rotation Axis | 节点约束的Rotation轴,仅在包含RotationConstraint、LookAtConstraint、AimConstraint或ParentConstraint时显示 |
| Scale Axis | 节点约束的Scale轴,仅在包含ScaleConstraint时显示 |
| Constraints | 节点应用的约束,选中某一约束后在面板下方显示该约束的设置参数 |
| Constraint Name | 约束的名字 |
| Constraint Type | 约束的类型 |
| Constraint Weight | 约束的权重,约束Transform相同分量的Constraints会权重归一化,如RotationConstraint、LookAtConstraint和AimConstraint都存在时,它们的权重会统一归一化;当约束Transform相同分量的Constraints的权重和小于1时,保持原始权重值 |
| 参数 | 持有该参数的约束 | 说明 |
|---|---|---|
| Maintain Offset | All | 是否使该约束保持默认Pose下的偏移 |
| Constraint Axis | 除 LookAtConstraint | 该约束可影响的轴 |
| Sources | All | 源骨骼及其权重,同一约束的所有源骨骼的权重会归一化 |
| Use World Up Object | LookAtConstraint | 决定World Up Vecotr该如何计算。当设置为 true 时,约束使用 World Up Object 来计算 World Up Vecotr。当设置为 false 时,约束使用世界 Y 轴作为 WorldUpVecotr |
| Roll | LookAtConstraint | 旋转世界 Y 轴 Roll 度作为 Up Vector |
| World Up Object | LookAtConstraint 和 AimConstraint | 计算 WorldUpVecotr |
| Aim Vector | AimConstraint | 受约束对象朝向的轴 |
| Up Vector | AimConstraint | Up Vector 控制约束对象绕 Aim Vector的旋转。它定义在约束对象的局部空间中 |
| World Up Type | AimConstraint | 决定 World Up Vector 的计算方式,参考AimConstraint.WorldUpType |
| World Up Vector | AimConstraint | 当 World Up Type 为 AimConstraint.WorldUpType.Vector 或 AimConstraint.WorldUpType.ObjectRotationUp 时使用的 World Up Vecotr |
可端口化:除约束类型和约束名字,其余参数均可端口化
在属性上点击右键弹出 Show As Port 菜单,点击即可端口化,再次点击可取消端口化
