# Spawn Areas

### description: Using Spawn Areas to set the Spawning position & Spawn Camera position visually.

## Spawn Areas

The creator can set the **Spawn Position** and **Spawn Camera Target** in the Creator Hub by editing a **Spawn Area** Entity.

This gives the creator a visual way of setting the Spawn Area and the direction the avatar will be facing when spawned as done with other objects in the scene.

![](https://45449780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-03f89e74cc5e8d88c5b72611a188f78346f24f70%2Fspawn-entity-scene-editor.png?alt=media)

The Spawn Area is composed of two different entities that work together:

* **Spawn** Entity: can be found inside the **Player** Entity. Defines the actual Spawn Point of the Player.

![](https://45449780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-a429daf2399dff521c426b6c93f594134d3d85d1%2Fspawn-entity.png?alt=media)

* **Camera Target** Entity: can be found inside the **Spawn Area** Entity. Move it to the desired direction in which the Player will be spawned.

![](https://45449780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-d02cfe4e8573326cce5cccb4dc0fa433943da7dd%2Fspawn-camera-entity.png?alt=media)

### Changing Spawn Areas

**Spawn Areas** and their **Camera Target** can be moved directly from the Scene Editor as with any other object in the scene, or modify it's values manually (as with Transforms in other Entities).

#### Parameters

When a Spawn Area is selected, the creator is able to see and set the following values on the Components section:

![](https://45449780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-7795398a2f7ea8b1adcbb202a31edb1e1f932569%2Fdefault-spawn-point-component.png?alt=media)

* **Position**: Avatar's Spawn Position.
* **Spawn Camera Target**: The direction the camera (and the avatar) will be facing once spawned into the scene. When modifying the Spawn Camera Target.
* **Randomized Area**: Adds randomness to the Spawn Area in meters, enabling and disabling it with the **Don't randomize** toggle. When enabled, an area is rendered in the Scene Editor, showing the area in which the Player can randonmly be spawned in.

![](https://45449780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-c0fa3d111dded3970cfe65fbb2560df57c7f9c74%2Fspawn-point-randomized.png?alt=media)

### Multiple Spawn Areas

![](https://45449780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-f83239964ac95e195a07f435a1abda38a11f2e9a%2Fspawn-area-multiple-scene-editor.png?alt=media)

The creator can have multiple **Spawn Areas** defined. To create a new Spawn Area, follow these steps:

1. Select any Spawn Area, **spawn1** being the default.
2. All the Spawn Areas show on the right Panel. You can add new ones by clicking on **+ Add New Spawn Area** ![icon](https://45449780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-904df69cb6b4e6772b82bd2f5006022a40cc886b%2Fspawn-area-add-new.png?alt=media).

![](https://45449780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-a7d4c514ad3b81c4dd994ba4c7e75b3a6754dc82%2Fspawn-area-multiple-components.png?alt=media)

3. Enable the **Main Spawn** ![icon](https://45449780-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-746d667c0a3c33f23c0b47ab6f2d7cd330309296%2Fspawn-areas-main-spawn-toggle.png?alt=media) of the desired Spawn Area. If there are many Spawn areas toggled as **Main Spawn**, the player will randonmly appear in one of them.
4. Preview the scene.
