ExistentSpace

Overview

An Existent Space is the virtual representation of your Stage (physical play area), and is the essential building block of a physically interactive level in Existent. While your Players move around the same physical environment for the duration of your experience, they can inhabit many different Spaces placed in different locations around the virtual world.

At any one time while running your game, each Player and prop exists inside exactly one Space, and that Space serves as the origin for tracking coordinates coming from the HMD or your tracking system. When a Player or prop is moved from one Space to another, it’s automatically moved to the corresponding relative location in the new Space.

Inside the Unreal editor (and in-game with backstage mode enabled), a Space is visualised as a 2D grid in the shape of your Stage, in a distinct auto-generated colour, with the Space Actor name displayed above the origin. To clarify the transform relationship between a Space and the entities contained inside it, whenever a Player or prop is inserted into a Space, they are automatically assigned as Actor children of the Space in the Unreal outliner.

How to use

You can drag and drop an ExistentSpace Actor into your level to create an instance of a Space. Alternatively you can create a new BP class that inherits from ExistentSpace and place that in your level. From there, you’ll need to update the Stage property of the Space Actor to point to your Stage, and you should see the Space visualised in the editor according to the shape and dimensions of your Stage.

Props can be added to a Space either by dragging them into the bounds of the Space in the level, or by setting the CurrentSpace property on their ExistentTrackerComponent. To change which Space new Players spawn into when the game starts, simply edit the World Settings -> Default Space for Spawn property.

Additional Details

  • Space Colour: Whenever a Space is placed in a level, it’s automatically assigned a unique colour, but this can be customised by modifying its Colour property.

  • Visualisation: By default, a Space will always be visualised in the editor (or in-game with backstage mode enabled) as a grid outline of its Stage shape and dimensions, but this can be toggled off by disabling its Render in Editor property. If backstage mode is enabled in-game, the Space currently occupied by the game’s locally controlled Player will be highlighted with a strobing light effect.

  • Safety boundary: In-game (regardless of whether backstage mode is enabled), when Players approach the edge of the Space boundary, a 3D wall boundary visualisation will appear in the Space’s colour to warn them that they are about to leave the game’s bounds (see the Stage section for details on how to customise this behaviour).

  • Transform hierarchy: An ExistentSpace is an Unreal Actor, which means it has a transform given by its root component. Any Player or prop placed inside the Space will by default be automatically childed to the Space Actor, such that moving the Space around in the level automatically moves its children to the correct world poses that maintain their relative coordinates.

Last updated