> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/jiao-hu-xing/modifier-areas.md).

# 修饰器区域

在场景编辑器中使用修饰器区域，以更改某个区域内的头像行为或强制使用相机模式。

修改器区域是不可见的区域，会改变玩家在场景中某一部分的体验。有两种类型：

* **头像修改区域**：会改变该区域内玩家的头像行为或外观，例如隐藏头像或禁用护照弹窗。
* **摄像机修改区域**：在玩家处于该区域内时，强制其摄像机切换为第一人称或第三人称。

这两种类型在玩家走出区域后都会恢复为正常行为。

## 添加修改器区域

你可以通过两种方式添加修改器区域：

**从资产目录：** 打开资产目录并搜索 **头像修改区域** 或 **摄像机修改区域** 下的 **Utils** 类别。将其拖入场景。该项会显示为半透明的占位立方体，仅在编辑器中可见，在运行中的场景里不可见。

**从组件菜单：** 选择任意已有实体，点击属性面板顶部的 **+** 按钮，然后从列表中选择 **头像修改区域** 或 **摄像机修改区域** 。参见 [添加组件](/creator/content-creator-zh/chang-jing-bian-ji-qi/gou-jian/components.md#add-components) 了解更多详情。

## 区域大小设置

修改器区域的大小由实体的 **Transform 缩放**控制。如果将实体缩放为 4 x 3 x 4，修改器区域就会变成一个以实体位置为中心、尺寸为 4 x 3 x 4 米的盒子。使用缩放控制柄，或在 Transform 组件中输入精确值来设置所需大小。

{% hint style="warning" %}
**注意：** 编辑器面板中没有单独的“Area”字段。编辑器会自动将内部的区域属性与实体的缩放同步，因此你只需要调整实体大小即可。
{% endhint %}

## 头像修改区域

Avatar Modifier Area 面板有两个设置：

### Modifiers

一个可多选的下拉菜单，包含以下选项：

* **隐藏头像**：该区域内的头像会变为不可见。区域内的玩家彼此看不见，但区域外的玩家仍然能正常看到他们。
* **禁用护照**：点击该区域内某位玩家的头像将不再打开其个人资料弹窗。

你可以在同一个区域中选择一个或两个修改器。默认情况下未选择任何修改器。

### 排除玩家 ID

不受这些修改器影响的钱包地址列表。地址在此列表中的玩家即使处于区域内也会正常表现。

点击 **添加玩家 ID** 来添加一项，然后粘贴钱包地址。要移除一项，请点击其旁边的三点菜单并选择 **移除玩家 ID**.

这对你想在舞台上隐藏观众头像但保留表演者可见的活动很有用。

{% hint style="warning" %}
**注意：** 请确保钱包地址为小写。修改器区域使用精确字符串匹配。
{% endhint %}

### 使用场景

* **隐私区域**：在后台或更衣区隐藏头像。
* **整洁舞台**：在舞台上隐藏观众头像，这样只有表演者（列在“排除玩家 ID”中）可见。
* **游戏竞技场**：在战斗区域禁用护照，以免玩家在游戏过程中意外打开个人资料。

## 摄像机修改区域

Camera Modifier Area 面板有一个设置：

### Camera Mode

一个包含两个选项的下拉菜单：

* **第一人称**：强制玩家在该区域内使用第一人称视角。
* **第三人称**：强制玩家在该区域内使用第三人称视角。

默认值为 **第一人称**。当玩家离开该区域时，会恢复其之前的摄像机模式。

{% hint style="info" %}
**提示：** 这里不提供电影摄像机模式。若要控制除第一/第三人称切换之外的摄像机，请使用 [虚拟摄像机](/creator/content-creator-zh/chang-jing-sdk7/3d-nei-rong-ji-chu/camera.md#using-virtual-cameras) 并编写代码。
{% endhint %}

### 使用场景

* **狭窄走廊或谜题房间**：强制使用第一人称，以便准确点击小物体。
* **风景观景点**：强制使用第三人称，让玩家可以看到自己的头像与背景同框。
* **教程区域**：确保所有玩家在引导体验中使用相同的摄像机模式。

## 组合修改器区域

你可以将两种修改器区域都放在同一个实体上，或让独立的修改器区域在同一空间内重叠。每个区域都会独立应用其效果。

{% hint style="warning" %}
**注意：** 请保持场景中的修改器区域数量较少。过多会影响性能。对于大多数场景来说，少量几个就足够了。
{% endhint %}

## 将修改器区域与代码一起使用

场景编辑器中的组件与 SDK7 `AvatarModifierArea` 和 `CameraModeArea` 组件直接对应。有关可用修改器、运行时行为以及动态更改排除列表等高级选项的完整详情，请参见：

* [头像修改器区域](/creator/content-creator-zh/chang-jing-sdk7/jiao-hu-xing/player-avatar.md#avatar-modifier-areas) （SDK7）
* [摄像机模式区域](/creator/content-creator-zh/chang-jing-sdk7/3d-nei-rong-ji-chu/camera.md#1st-and-3rd-person-camera-modes) （SDK7）


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/jiao-hu-xing/modifier-areas.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
