> 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/utilities/gaze-and-attention/profiles-and-tuning.md).

# 注意力与注视配置文件

四个 ScriptableObject 配置文件控制凝视与注意力系统。每个配置文件负责一个独立的行为域。可通过 Inspector 将它们分配给相应组件，或留空以使用内置默认值。

***

### ConvaiAttentionProfile

控制目标选择：哪个候选对象获得焦点、角色多快进入专注，以及在转向别处前保持多久。

**通过以下方式创建：** Create → Convai → Embodiment → Attention Profile\
**分配给：** `ConvaiAttentionController` → Attention Profile 字段

#### 专注时机

| 字段                         | 默认值    | 范围     | 说明                        |
| -------------------------- | ------ | ------ | ------------------------- |
| `CommitmentAcquireSeconds` | `0.3`  | 0.1–10 | 当获得新目标时，专注从 0 → 1 递增所需的秒数 |
| `CommitmentReleaseSeconds` | `0.5`  | 0.1–10 | 当目标丢失时，专注从 1 → 0 衰减所需的秒数  |
| `FocusLossHoldSeconds`     | `0.25` | 0–3    | 在失去目标视线后、专注开始衰减前的宽限时间     |

#### 兴趣预算

兴趣预算可防止角色无限期地盯住单一目标。每一帧，当前焦点的兴趣会以 `InterestDecayPerSecond`。当兴趣降到 `InterestBreakThreshold`，注意力系统将释放该目标并评估其他候选项。

| 字段                          | 默认值    | 范围     | 说明                     |
| --------------------------- | ------ | ------ | ---------------------- |
| `MaxContinuousHoldSeconds`  | `5.0`  | 0.5–20 | 单个目标在兴趣被强制耗尽前可被保持的最长秒数 |
| `InterestBreakThreshold`    | `0.15` | 0–1    | 系统释放当前目标时的兴趣水平         |
| `InterestDecayPerSecond`    | `0.15` | 0.05–5 | 盯着当前目标时，兴趣每秒下降的速度      |
| `InterestRecoveryPerSecond` | `0.25` | 0.05–5 | 在被忽略的候选对象中，兴趣每秒恢复的速度   |

#### 平滑与偏移

| 字段                       | 默认值            | 范围     | 说明                        |
| ------------------------ | -------------- | ------ | ------------------------- |
| `FocusPositionLerpSpeed` | `10.0`         | 0.1–30 | 用于平滑世界空间焦点位置的插值速度         |
| `FocusOffset`            | `(0, 0.05, 0)` | —      | 添加到焦点位置的世界空间偏移，适合用于瞄准面部高度 |

#### 默认焦点提供器

这些字段用于调整内置的相机瞄准提供器，该提供器会在 **自动创建默认焦点提供器** 在……上启用时 `ConvaiAttentionController`.

| 字段                                  | 默认值   | 范围  | 说明                   |
| ----------------------------------- | ----- | --- | -------------------- |
| `DefaultFocusBaseRelevance`         | `0.8` | 0–1 | 默认提供器返回的基础相关度分数      |
| `DefaultFocusTargetHeadHeight`      | `0`   | ≥ 0 | 在瞄准一个变换时应用于焦点位置的垂直偏移 |
| `DefaultFocusMaxDistance`           | `8.0` | ≥ 0 | 超过该距离后默认提供器返回零相关度    |
| `DefaultFocusFullRelevanceDistance` | `3.0` | ≥ 0 | 在该距离内默认提供器返回完整基础相关度  |

***

### ConvaiGazeCoordinationProfile

控制在各个对话状态下注意力输出如何加权——整体凝视系统拥有多大的控制权，以及该控制权如何在眼睛和头部之间分配。

**通过以下方式创建：** 创建 → Convai → Embodiment → Gaze Coordination Profile\
**分配给：** `ConvaiGazeCoordinator` （由……自动创建） `ConvaiEyeGazeActuator`)

#### 各状态权重

每个对话状态都有一个 `OverallWeight` 以及一个 `EyeShare`.

* **OverallWeight** ——角色注视注意力目标的强度（0 = 完全放松，1 = 锁定）
* **EyeShare** ——仅由眼睛处理的跟踪比例。头部处理 `1 − EyeShare`.

| 对话状态   | OverallWeight | EyeShare | 说明                 |
| ------ | ------------- | -------- | ------------------ |
| `空闲`   | `0.45`        | `0.85`   | 注意力目标被抑制；眼睛自由游移    |
| `倾听`   | `0.93`        | `0.52`   | 强烈投入，眼睛/头部分配均衡     |
| `注视中`  | `0.90`        | `0.62`   | 玩家说话前角色朝焦点转向       |
| `思考中`  | `0.95`        | `0.80`   | 玩家已结束；角色尚未回复；以眼睛为主 |
| `发言`   | `1.0`         | `0.45`   | 完全投入，以头部为主——“锁定”状态 |
| `反应中`  | `0.95`        | `0.48`   | 短暂反应节拍；与说话时的分配相似   |
| `被打断`  | `0.88`        | `0.85`   | 短暂停顿；以眼睛为主         |
| `进入平静` | `0.93`        | `0.70`   | 回合结束后的冷却；凝视变柔和     |

{% hint style="info" %}
该 `空闲` 状态会设置 `SuppressAttentionTarget = true`，这会完全禁用注意力输入，让眼睛和头部执行器在不跟踪目标的情况下运行其空闲探索行为。
{% endhint %}

#### 混合平滑

| 字段                   | 默认值   | 范围   | 说明                             |
| -------------------- | ----- | ---- | ------------------------------ |
| `WeightBlendSpeed`   | `6.0` | 0–20 | 用于平滑 `OverallWeight` 对话状态之间的过渡 |
| `EyeShareBlendSpeed` | `4.0` | 0–20 | 用于平滑 `EyeShare` 对话状态之间的过渡      |

***

### ConvaiGazeEyeProfile

控制眼睛旋转机制：跟踪响应、范围限制、程序化扫视、微颤、空闲游移和眨眼行为。

**通过以下方式创建：** 创建 → Convai → Embodiment → Gaze Eye Profile\
**分配给：** `ConvaiEyeGazeActuator` → Eye Profile 字段

#### 跟踪

| 字段                  | 默认值    | 范围   | 说明                          |
| ------------------- | ------ | ---- | --------------------------- |
| `TrackingSharpness` | `18.0` | 1–40 | 眼睛转向凝视目标的速度。18 与自然人类眼动速度相符。 |
| `MaxYawDegrees`     | `45.0` | 0–90 | 眼睛水平旋转的最大角度                 |
| `MaxPitchDegrees`   | `30.0` | 0–90 | 眼睛垂直旋转的最大角度                 |

#### 扫视

扫视是微小的非自主眼球运动，可使凝视更有生命感。

| 字段                      | 默认值    | 范围        | 说明          |
| ----------------------- | ------ | --------- | ----------- |
| `EnableSaccades`        | `true` | —         | 启用程序化扫视     |
| `SaccadeIntervalMean`   | `1.8`  | ≥ 0.05    | 两次扫视之间的平均秒数 |
| `SaccadeIntervalJitter` | `0.65` | ≥ 0       | 添加到间隔中的随机变化 |
| `SaccadeMaxDegrees`     | `2.5`  | 0–5       | 每次扫视的最大位移角度 |
| `SaccadeDuration`       | `0.07` | 0.01–0.25 | 每次扫视运动持续的秒数 |

#### 微颤

模拟生理性眼震颤的高频噪声。

| 字段                     | 默认值    | 范围   | 说明      |
| ---------------------- | ------ | ---- | ------- |
| `EnableMicroTremor`    | `true` | —    | 启用微颤噪声  |
| `MicroTremorAmplitude` | `0.18` | 0–1  | 颤动位移的幅度 |
| `MicroTremorFrequency` | `11.0` | 1–30 | 频率（Hz）  |

#### 空闲探索

当注意力目标被抑制（空闲对话状态）时，眼睛会在可配置范围内游移。

| 字段                                 | 默认值    | 范围     | 说明              |
| ---------------------------------- | ------ | ------ | --------------- |
| `EnableIdleExploration`            | `true` | —      | 启用空闲眼动游移        |
| `IdleExplorationWeight`            | `0.65` | 0–1    | 空闲探索相对于正前方的混合权重 |
| `IdleExplorationHorizontalDegrees` | `14.0` | 0–45   | 水平游移范围的最大角度     |
| `IdleExplorationUpDegrees`         | `5.0`  | 0–25   | 向上游移的最大角度       |
| `IdleExplorationDownDegrees`       | `8.0`  | 0–25   | 向下游移的最大角度       |
| `IdleExplorationIntervalMin`       | `1.1`  | ≥ 0.05 | 探索目标变化之间的最小秒数   |
| `IdleExplorationIntervalMax`       | `3.2`  | ≥ 0.05 | 探索目标变化之间的最大秒数   |
| `IdleExplorationCenterBias`        | `0.38` | 0–1    | 每个间隔内返回中心方向的概率  |
| `IdleRecenteringChance`            | `0.22` | 0–1    | 每个间隔额外应用的居中概率   |

#### 眨眼

| 字段            | 默认值    | 说明                                                               |
| ------------- | ------ | ---------------------------------------------------------------- |
| `EnableBlink` | `true` | 启用程序化眨眼调度。眨眼时机由 `EyeBlinkScheduler` ——眨眼频率不能通过此配置文件直接设置，但可以完全禁用。 |

***

### ConvaiGazeHeadProfile

控制颈部和头部旋转：范围限制、平滑、空闲头部游移，以及最小头部贡献。

**通过以下方式创建：** 创建 → Convai → Embodiment → Gaze Head Profile\
**分配给：** `ConvaiHeadLookActuator` → Head Profile 字段

#### 范围

| 字段             | 默认值    | 范围   | 说明               |
| -------------- | ------ | ---- | ---------------- |
| `MaxNeckYaw`   | `40.0` | 0–90 | 施加到颈部骨骼的最大偏航旋转角度 |
| `MaxNeckPitch` | `30.0` | 0–90 | 施加到颈部骨骼的最大俯仰旋转角度 |
| `MaxHeadYaw`   | `20.0` | 0–60 | 施加到头部骨骼的最大偏航旋转角度 |
| `MaxHeadPitch` | `15.0` | 0–60 | 施加到头部骨骼的最大俯仰旋转角度 |

#### 平滑

| 字段                     | 默认值     | 范围     | 说明                     |
| ---------------------- | ------- | ------ | ---------------------- |
| `SmoothingSharpness`   | `6.0`   | 0.5–30 | 朝凝视目标跟踪时的响应速度          |
| `ReturnSharpness`      | `5.0`   | 0.5–30 | 返回中立姿态时的响应速度           |
| `IdleSharpness`        | `2.2`   | 0.5–30 | 空闲探索期间的平滑度（越慢 = 越有梦幻感） |
| `MaxYawSpeedDegrees`   | `160.0` | 0–720  | 每秒最大偏航旋转速度（度）          |
| `MaxPitchSpeedDegrees` | `120.0` | 0–720  | 每秒最大俯仰旋转速度（度）          |
| `DeadzoneDegrees`      | `1.5`   | 0–10   | 低于该角度时抑制头部旋转——防止微抖动    |

#### 空闲探索

| 字段                           | 默认值    | 范围     | 说明             |
| ---------------------------- | ------ | ------ | -------------- |
| `EnableIdleExploration`      | `true` | —      | 在空闲状态下启用头部游移   |
| `IdleExplorationWeight`      | `0.7`  | 0–1    | 空闲探索目标的混合权重    |
| `IdleExplorationYawDegrees`  | `6.0`  | 0–30   | 头部水平游移的最大角度    |
| `IdleExplorationUpDegrees`   | `1.5`  | 0–15   | 向上游移的最大角度      |
| `IdleExplorationDownDegrees` | `2.5`  | 0–15   | 向下游移的最大角度      |
| `IdleExplorationIntervalMin` | `2.2`  | ≥ 0.05 | 头部目标变化之间的最小秒数  |
| `IdleExplorationIntervalMax` | `5.5`  | ≥ 0.05 | 头部目标变化之间的最大秒数  |
| `IdleExplorationCenterBias`  | `0.55` | 0–1    | 每个间隔内返回中心方向的概率 |
| `IdleRecenteringChance`      | `0.32` | 0–1    | 每个间隔额外的居中概率    |

#### 主导权

| 字段                        | 默认值    | 范围  | 说明                                                 |
| ------------------------- | ------ | --- | -------------------------------------------------- |
| `MinimumHeadContribution` | `0.45` | 0–1 | 头部旋转贡献的下限。即使协调器分配了较低的头部占比，头部的贡献也不会低于此比例。防止头部看起来僵住。 |

***

### 下一步

有关特定场景的配置文件设置，请参见使用示例；如果您需要读取注意力状态或实现自定义焦点提供器，请参见 Scripting API。

{% content-ref url="/pages/a207c4438cb0378f687867334e1e2e2b5d8c75bb" %}
[注视与注意力使用示例](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/utilities/gaze-and-attention/usage-examples.md)
{% endcontent-ref %}

{% content-ref url="/pages/5a9422b007899ae59891f1bd5d95035da644a167" %}
[注视与注意力脚本 API](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/utilities/gaze-and-attention/scripting-api.md)
{% endcontent-ref %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/utilities/gaze-and-attention/profiles-and-tuning.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
