Version:

将布娃娃添加到动画图形中

创建动画图形来控制角色的布偶模拟时,需要执行以下操作:

  • 准备Actor资产。
  • 调整动画图形以启用布偶。
  • 预览。

动画图谱可控制角色的布偶模拟。当您的角色过渡到具有布偶节点的混合树时,布偶会自动激活并在O3DE 编辑器的游戏模式中模拟。当角色脱离该状态时,布偶会停止激活。布偶节点会在动画编辑器中输出一个绑定姿势。

创建从运行状态过渡到布偶状态的动画图

  1. 在菜单栏右侧的动画编辑器中,从下拉列表中选择AnimGraph。这将改变布局。

    Change the Animation Editor layout by choosing AnimGraph from the drop-down list

  2. Anim Graph窗格中,单击**+**图标创建新的动画图形。

  3. 右键单击网格,然后选择SourcesMotion。或者,在Node PaletteSources部分,将Motion拖入动画图形。

    Add a Motion node to the animation graph from the context menu or the Node Palette in the Animation Editor

  4. 在动画图表中选择 Motion 节点。

  5. Inspector 面板中,完成以下操作:

    1. 对于 Name, 为动作输入名称。例如,Run

    2. Select motions下点击 + 图表。在Motion Selection窗口中,选择一个动作,然后点击OK

  6. 右击网格,然后点击Sources, Blend Tree。同样,在Node Palette中,在Sources部分,将Blend Tree拖拽到动画图表中。 Add a Blend Tree node to the animation graph from the context menu or the Node Palette in the Animation Editor

  7. 在动画图表中选择 Blend Tree 节点。

  8. Inspector面板中,为混合树输入名称。例如,Ragdoll

  9. 在动画图表中,连接Motion节点到Blend Tree节点。例如,连接Run节点到Ragdoll节点。

    Connect the Motion node to the Blend Tree node in the animation graph in the Animation Editor

  10. 双击Blend Tree节点。

  11. 右击网格,然后选择Physics, Activate Ragdoll Joints。同样,在Node Palette中,在Physics部分,将Activate Ragdoll Joints拖拽到动画图表中。

  12. Activate Ragdoll JointsOutput Pose 连接到Final NodeInput Pose

    Connect Activate Ragdoll Joints node to Final Node in the animation graph

  13. 在动画图形的根部,选择从Motion节点开始并连接到Blend Tree节点的过渡线。例如,选择连接 Run 节点和 Ragdoll 节点的过渡线。

    Select the transition line that connects the Motion node to the Blend Tree node in the Animation Editor

  14. Inspector面板中,点击 Add condition ,然后选择 Time Condition

    Add a Time Condition from the Attributes pane in the Animation Editor

  15. Time Condition 下,设置 Countdown Time

  16. 在动画图表中,点击 Motion 节点进行预览。