Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
* [Smart Items - Basic](creator/scene-editor/interactivity/smart-items.md)
* [States and conditions](creator/scene-editor/interactivity/states-and-conditions.md)
* [Trigger Area](creator/scene-editor/interactivity/trigger-area.md)
* [Modifier Areas](creator/scene-editor/interactivity/modifier-areas.md)
* [Video Screen](creator/scene-editor/interactivity/video-screen.md)
* [Live Operations](creator/scene-editor/live-ops/README.md)
* [Live Streaming](creator/scene-editor/live-ops/live-streaming.md)
Expand Down
1 change: 1 addition & 0 deletions creator/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
* [Interactivity](scene-editor/interactivity/)
* [Smart Items - Basic](scene-editor/interactivity/smart-items.md)
* [Trigger Area](scene-editor/interactivity/trigger-area.md)
* [Modifier Areas](scene-editor/interactivity/modifier-areas.md)
* [Video Screen](scene-editor/interactivity/video-screen.md)
* [States and conditions](scene-editor/interactivity/states-and-conditions.md)
* [Smart Items - Advanced](scene-editor/interactivity/smart-items-advanced.md)
Expand Down
2 changes: 2 additions & 0 deletions creator/scene-editor/build/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ The following Components can be added to any Entity via the Scene Editor UI:
- **NFT Shape**: Displays the image of an NFT inside a frame. See [Display an NFT](nfts.md).
- **Particle System**: Emits particles from the Entity's location, for effects like smoke, fire or sparkles. See [Particle systems](../../sdk7/3d-essentials/particle-system.md).
- **Virtual Camera**: Defines a custom camera angle that the scene can switch the player's view to. See [Camera](../../sdk7/3d-essentials/camera.md).
- **Avatar Modifier Area**: Changes how avatars behave or appear for players inside a region centered on this entity. The entity's scale sets the size of the region. See [Modifier Areas](../interactivity/modifier-areas.md).
- **Camera Modifier Area**: Forces the player's camera into first or third person inside a region centered on this entity. The entity's scale sets the size of the region. See [Modifier Areas](../interactivity/modifier-areas.md).
- **Script**: Attaches a custom code module to the Entity, with parameters you can configure from the UI. See [Script component](../code/script-component.md).

{% hint style="warning" %}
Expand Down
97 changes: 97 additions & 0 deletions creator/scene-editor/interactivity/modifier-areas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
description: Use modifier areas in the Scene Editor to change avatar behavior or force a camera mode inside a region of your scene.
---

# Modifier Areas

Modifier areas are invisible regions that change how players experience part of your scene. There are two types:

- **Avatar Modifier Area**: Changes how avatars behave or appear for players inside the region, for example hiding avatars or disabling passport popups.
- **Camera Modifier Area**: Forces the player's camera into first person or third person while they are inside the region.

Both types revert to normal behavior when the player walks out.

## Adding a modifier area

You can add a modifier area in two ways:

**From the asset catalog:** Open the asset catalog and search for **Avatar Modifier Area** or **Camera Modifier Area** under the **Utils** category. Drag it into the scene. The item appears as a translucent placeholder cube that is only visible in the editor, not in the running scene.

**From the components menu:** Select any existing entity, click the **+** button at the top of the properties panel, and choose **Avatar Modifier Area** or **Camera Modifier Area** from the list. See [Add components](../build/components.md#add-components) for more details.

## Sizing the area

The size of a modifier area is controlled by the entity's **Transform scale**. If you scale the entity to 4 x 3 x 4, the modifier region becomes a 4 x 3 x 4 meter box centered on the entity's position. Use the scale gizmo or type exact values in the Transform component to set the size you need.

{% hint style="warning" %}
**Note:** There is no separate "Area" field in the editor panel. The editor keeps the internal area property in sync with the entity's scale automatically, so resizing the entity is all you need to do.
{% endhint %}

## Avatar Modifier Area

The Avatar Modifier Area panel has two settings:

### Modifiers

A multi-select dropdown with the following options:

- **Hide Avatars**: Avatars inside the area become invisible. Players inside cannot see each other, but players outside the area still see them normally.
- **Disable Passports**: Clicking on a player's avatar inside the area no longer opens their profile popup.

You can select one or both modifiers on the same area. By default, no modifiers are selected.

### Exclude Player IDs

A list of wallet addresses that are not affected by the modifiers. Players whose address is in this list behave normally even while inside the area.

Click **Add Player ID** to add an entry, then paste the wallet address. To remove one, click the three-dot menu next to it and select **Remove Player ID**.

This is useful for events where you want to hide audience avatars on a stage but keep the performers visible.

{% hint style="warning" %}
**Note:** Make sure wallet addresses are lowercase. The modifier area uses exact string matching.
{% endhint %}

### Use cases

- **Privacy zones**: Hide avatars in a backstage or changing area.
- **Clean stages**: Hide audience avatars on a stage so only performers (listed in Exclude Player IDs) are visible.
- **Game arenas**: Disable passports in a combat area so players don't accidentally open profiles during gameplay.

## Camera Modifier Area

The Camera Modifier Area panel has one setting:

### Camera Mode

A dropdown with two options:

- **First Person**: Forces the player into first-person view while inside the area.
- **Third Person**: Forces the player into third-person view while inside the area.

The default is **First Person**. When a player leaves the area, their previous camera mode is restored.

{% hint style="info" %}
**Tip:** Cinematic camera mode is not available here. To control the camera beyond first/third person switching, use a [Virtual Camera](../../sdk7/3d-essentials/camera.md#using-virtual-cameras) with code.
{% endhint %}

### Use cases

- **Narrow corridors or puzzle rooms**: Force first person for precise clicking on small objects.
- **Scenic overlooks**: Force third person so players can see their avatar against the backdrop.
- **Tutorial zones**: Ensure all players use the same camera mode during a guided experience.

## Combining modifier areas

You can place both types of modifier area on the same entity, or overlap separate modifier areas in the same space. Each area applies its effects independently.

{% hint style="warning" %}
**Note:** Keep the number of modifier areas in your scene low. Too many can affect performance. A handful is fine for most scenes.
{% endhint %}

## Using modifier areas with code

The Scene Editor components correspond directly to the SDK7 `AvatarModifierArea` and `CameraModeArea` components. For full details on the available modifiers, runtime behavior, and advanced options like dynamically changing the exclude list, see:

- [Avatar modifier areas](../../sdk7/interactivity/player-avatar.md#avatar-modifier-areas) (SDK7)
- [Camera mode areas](../../sdk7/3d-essentials/camera.md#1st-and-3rd-person-camera-modes) (SDK7)
2 changes: 2 additions & 0 deletions creator/scene-editor/interactivity/smart-items.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Here are some common items and their default behaviors:
* **Chests**: They behave like doors, by default are opened or closed when clicking. You can place smaller items inside them.
* **Platforms**: They move between two positions. Use their tween actions to control where they move to, their speed, etc.
* **Trigger area**: An invisible item that can trigger other smart items when the player walks into its area. See [About trigger areas](smart-items.md#trigger-areas).
* **Avatar Modifier Area**: An invisible area that changes how avatars behave or appear inside it, for example hiding avatars or disabling passport popups. See [Modifier Areas](modifier-areas.md).
* **Camera Modifier Area**: An invisible area that forces the player's camera into first or third person while inside. See [Modifier Areas](modifier-areas.md).
* **Video Player**: A screen for showing videos or live streams. See [Playing Videos](smart-items.md#playing-videos).
* **Audio Stream**: Play audio from a live stream. See [Playing Audio Streams](smart-items.md#playing-audio-streams)
* **NFT**: Display an NFT image as a portrait. See [Displaying NFTs](smart-items.md#displaying-nfts)
Expand Down
22 changes: 18 additions & 4 deletions creator/sdk7/interactivity/runtime-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,30 @@ engine.addSystem((deltaTime) => {
engineInfo.tickNumber +
'\ntotalRuntime: ' +
engineInfo.totalRuntime +
'\nsceneHidden: ' +
engineInfo.sceneHidden +
'\n--------------'
)
})
```

The `EngineInfo`component holds the following data:
You can use `sceneHidden` to pause resource-intensive work while the scene is not visible:

* `frame_number`: Frame counter of the engine
* `total_runtime`: Total runtime of this scene in seconds
* `tick_number`: Tick counter of the scene as per [ADR-148](https://adr.decentraland.org/adr/ADR-148)
```ts
engine.addSystem((deltaTime) => {
const engineInfo = EngineInfo.getOrNull(engine.RootEntity)
if (engineInfo?.sceneHidden) return

// Normal gameplay logic runs only when the scene is visible
})
```

The `EngineInfo` component holds the following data:

* `frameNumber`: Frame counter of the engine.
* `totalRuntime`: Total runtime of this scene, in seconds.
* `tickNumber`: Tick counter of the scene as per [ADR-148](https://adr.decentraland.org/adr/ADR-148).
* `sceneHidden`: `true` when the scene is hidden behind the Explorer's fullscreen UI (for example a loading screen or a fullscreen menu). Use this to pause gameplay, audio, or animations while the player can't see or interact with the scene.

{% hint style="warning" %}
**📔 Note**: The `EngineInfo` component must be imported via
Expand Down