# ExistentStage

## Overview

The <mark style="color:red;">**ExistentStage**</mark> class helps create and manage a stage or play area. This class provides a framework for setting up a safe and immersive virtual space by defining the boundaries, incorporating obstacles, and implementing safety features to enhance player safety and immersion.

<figure><img src="https://lh7-us.googleusercontent.com/jLhr4D1QC5f0hC0NAtzmHqQK1drTtYJRWGmE47TNracqII-o9MJrRHEa_xFJejVmyTT4nHJTRGYwEIWE2MyRWgqGQhel0Vi3dg_sIHGGeFmH5pAPhn7HB6QdviYJS5qdHFT2g6bGOPr0rEFwAIP9ew" alt=""><figcaption></figcaption></figure>

## How to use

Right-click on your content browser and select Existent→Stage. This will create a new Existent Stage object. Open the newly created asset and define the Stage parameters according to your physical area.  Then you can either set this as the default stage in project settings or set the stage parameter of each space you create if you want to take advantage of multiple stages in a single project.

{% hint style="warning" %}
The real world origin of your motion tracking system (whether that is Vive Trackers, Optitrack or Vicon) must correspond to the exact centre of the stage boundary you define here. Currently there’s no way to specify a different relationship between your tracking system origin and the stage boundary.
{% endhint %}

## Additional Details

* Stage Geometry: Supports both rectangular and circular stage shapes, enabling developers to tailor the virtual space to their application's specific requirements.
  * Shape Selection: Utilise the EExistentStageShape enum to select between rectangular or circular stage shapes.
  * Dimensions: Specify the size of a rectangular stage via the Dimensions property, using a FVector2D to represent width and length.
  * Radius: Define the size of a circular stage with the Radius property, determining the circular play area's radius.
* Safety Features and Obstacles:
  * Min Safe Distance from Edge: The MinSafeDistanceFromEdge property establishes a safety buffer, activating visual warnings when players approach the stage boundary.
  * Obstacles: Incorporate static physical obstacles (e.g., pillars) within the stage using the Obstacles array. For each obstacle you can define its mesh, transform, and enable safety rendering features.
* Visual Components:
  * Wall Meshes: Employ CubeWallMesh for rectangular stages and CylinderWallMesh for circular stages to visually denote boundaries.
  * Materials: Utilise distinct materials for stage boundaries (BoundaryMat) and obstacles (ObstacleMat) to visually distinguish these elements within the VR environment.


---

# Agent Instructions: 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.existent.com/documentation/v0.0.1/resources/classes-components/existentstage.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.
