Region

Region objects are basically used to create triggers; they are bounds in space that allow you to detect when another object either enter, overlap or leave the shape. Based on the current state of an actor more advanced logic can be created.

properties_object_region.png

Color: A representative color that will be used by the 3d viewport to draw the debug shape for the active region. To enable or disable the active region from detecting actors states click the icon. To toggle on/off the global state of the active region tap the icon.

Update Rate: The update frequency in hertz representing the number of times per second the region should be re-evaluated. A value of 0 represents that the ray should be updated every frame. Located on the right side of this control the number indicated near the icon represent how many object(s) are currently inside the active region.

Interior Margin: Specify an inner margin that delemit the interior of the region's shape.

Note
Since a region is basically creating a collision volume in space no scale can be applied on the object itself. Use the options available to you based on the type of the bound selected by the region to adjust the object/region size.

Events


Callback Description
OnEnter() Triggered once as soon another object pass the filtering process and enter the region bounds in space.
OnOverlay() Triggered on every update as long as a valid object (which have pass the filtering phase) is actually overlapping the region shape.
OnLeave() Triggered once as soon an object that was previous overlaying the region shape is now leaving it.

Bounds


The bounds of the active region represent a hotspot in space; a shape delimitation that can detect when another actor (in other words another object) is either entering, overlapping or leaving the volume. Having this in mind it is easy to use this mechanism in conjunction with (ie) scripts to detect if (ie) a door should open as the player approaches it; if an elevator should be activated if the player stands in the center plate etc...

In addition a region can also be used to asynchronously load and unload scene(s) dynamically based if an actor or a type of actors are contained or not within its volume.

Shape Type: Determine the type of bounds the active region should be using.

Box


properties_object_region_bounds_box.png
properties_object_region_bounds_box_preview.png

Size XYZ: The size of the axis aligned box on the XY and Z axis.

Margin XYZ: Inner margin size on the XY and Z axis.

Sphere


properties_object_region_bounds_sphere.png
properties_object_region_bounds_sphere_preview.png

Radius: The radius of the region represented as a sphere.

Margin: Inner radius margin of the spherical region.

Cylinder


properties_object_region_bounds_cylinder.png
properties_object_region_bounds_cylinder_preview.png

Height: The height of the region cylinder.

Radius: The radius of the region cylinder.

Height Margin: The inner height margin of the cylindrical region.

Radius Margin: The innder radius margin of the cylindrical region.

Filtering


properties_object_region_filtering.png

This section of the region properties is dedicated to filtering of actors to determine what kind can trigger region callbacks. To create a filtering mask click on all the object data type that can interact with the active region. Optionally a Name Filter (by filling a substring in the textbox with the icon) to the can be provided allowing you to narrow down which object can interact with the region. As an example in the screenshot above all types of meshes can interact with the region only if the keyword Red is found within their object name. To clear the active substring click the icon. To invert the name filter inclusion; toggle the .

Scene Streams


properties_object_region_scene_streams.png

This section allows you to specify the scene(s) that should be loaded asynchronously when a filtered object enters the bound of the active region. Once the region does not contain any actor within its volume the scene(s) associated with it will be progressively unloaded automatically.

Using this feature you can create a seamless world that load and unload scene(s) automatically as (ie.) the player camera or the player object itself enter and leave the region.

Add Scene: Create a new scene stream slot to hold the scene an asset to load/unload dynamically.

Remove All: Remove all existing scene stream slot(s).

Once a scene stream slot have been created you can setup the scene to load/unload by pressing the icon and select one from the list. To disconnect a connected scene press the icon or input an empty scene name.

To change the loading sequence of the scene stream slot you can either press or icons to increase or decrease the slot priority. To remove a specific slot press the button located on the far right of the slot entry in the list.

Actor Filter: Allows you to specify a string or a substring to be evaluated against the current actors name to trigger the scene stream loading/unloading.

Actor Type: The type of actor that can trigger the scene streams to be loaded or unloaded.




NRGeditor - Manual 2022.4.384543 - Fri Nov 4 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA