> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation.md).

# 身体动画

查找使用代码驱动的 Body Animation 模块为 Convai 角色添加待机、说话动作、行走和手势的指南。

身体动画是 Convai 具身模块，用于播放角色的待机、说话、移动、动作和指向动画。一个组件， `ConvaiBodyAnimationController`，构建并运行一个分层的 `PlayableGraph` 直接针对 Humanoid `Animator` ——无需创建 Animator Controller 资源。内容来自一个 `ConvaiBodyAnimationSet` 你分配的对象，并且行为在一个 `ConvaiBodyAnimationConfig`.

***

### 身体动画赋予角色什么

| 行为         | 它看起来是什么样                                                   |
| ---------- | ---------------------------------------------------------- |
| Idle       | 角色会在预设的待机变体之间切换，而不是保持一个静态姿势。                               |
| 说话动画       | 角色说话时播放上半身手势片段，并根据实时语音能量进行缩放。                              |
| Locomotion | 与 NavMesh 同步的步行和慢跑；如果素材集中的方向性起步、停止和转身有对应制作，也会一并使用。         |
| 动作与手势      | 命名片段，例如 `挥手` 或 `跳舞`，可通过 Convai 动作或通过你自己的代码经由 `PlayAction`. |
| 指向         | 角色会将手臂抬向世界坐标中的某个位置或一个移动目标，并保持该姿势。                          |

添加 `ConvaiBodyAnimationController` 通过……向角色 **Convai > 具身 > 身体动画**。SDK 自带默认动画集，因此新角色无需你先准备任何片段就能移动。

***

### 没有 Animator Controller 资源

你可能已经熟悉的其他 Unity 动画工作流——状态、过渡、在 Animator 窗口中连接的参数——在这里都不适用。控制器会将其 `PlayableGraph` 完全通过代码基于 `ConvaiBodyAnimationSet` 和 `ConvaiBodyAnimationConfig` 你分配的对象构建，并在任一项发生变化时重新构建它。 [身体动画如何工作](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/how-body-animation-works.md) 说明该图运行的层堆栈。

***

### 从哪里开始

{% content-ref url="/pages/0b1776a0ab300843aca8154fbdecf361fa671b9d" %}
[身体动画快速入门](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/quick-start.md)
{% endcontent-ref %}

***

### 探索身体动画

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>身体动画如何工作</strong><br>用于播放待机、说话、动作和指向动画的分层图，以及对话状态如何驱动它。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/how-body-animation-works.md">身体动画工作原理</a></td></tr><tr><td><strong>身体动画快速入门</strong><br>使用随附的动画集添加该组件，并在 Play 模式中查看待机和说话动画。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/quick-start.md">身体动画快速入门</a></td></tr><tr><td><strong>构建动画集</strong><br>从一个片段文件夹或逐字段构建你自己的 ConvaiBodyAnimationSet。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/build-an-animation-set.md">构建动画集</a></td></tr><tr><td><strong>配置 locomotion</strong><br>添加 ConvaiNavMeshLocomotion，或连接自定义的移动来源，并调整步行和慢跑速度。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/configure-locomotion.md">配置移动</a></td></tr><tr><td><strong>播放动作和手势</strong><br>从你自己的代码触发命名动作、锚定动作和指向。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/play-actions-and-gestures.md">播放动作和手势</a></td></tr><tr><td><strong>身体动画配置参考</strong><br>按分区分组的每个 ConvaiBodyAnimationConfig 字段及其默认值。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/config-reference.md">身体动画配置参考</a></td></tr><tr><td><strong>身体动画脚本参考</strong><br>ConvaiBodyAnimationController 的公共 API：方法、句柄和事件。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/scripting-reference.md">身体动画脚本参考</a></td></tr><tr><td><strong>身体动画使用示例</strong><br>引导式行走、按提示做手势，以及指向场景对象。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/usage-examples.md">身体动画使用示例</a></td></tr><tr><td><strong>身体动画故障排除</strong><br>无动画、T 姿势、移动不同步，以及如何读取跟踪日志。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/troubleshooting.md">身体动画故障排查</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
