reckfellENGINE

NavigationRegion3D

A traversable 3D region that NavigationAgent3Ds can use for pathfinding.

On this page
class NavigationRegion3DReckfellSharpInherits Entity3D

A traversable 3D region that NavigationAgent3Ds can use for pathfinding.

A traversable 3D region based on a NavigationMesh that NavigationAgent3Ds can use for pathfinding. Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using NavigationServer3D.MapSetEdgeConnectionMargin. Note: Overlapping two regions' navigation meshes is not enough for connecting two regions. They must share a similar edge. The cost of entering this region from another region can be controlled with the NavigationRegion3D.EnterCost value. Note: This value is not added to the path cost when the start position is already inside this region. The cost of traveling distances inside this region can be controlled with the NavigationRegion3D.TravelCost multiplier. Note: This node caches changes to its properties, so if you make changes to the underlying region Rid in NavigationServer3D, they will not be reflected in this node's properties.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

NavigationRegion3DConstructor
# NavigationRegion3D
C#
public NavigationRegion3D();

Properties6

EnabledProperty
# Enabled
C#
public bool Enabled { get; set; }

Determines if the NavigationRegion3D is enabled or disabled.

EnterCostProperty
# EnterCost
C#
public float EnterCost { get; set; }

When pathfinding enters this region's navigation mesh from another region's navigation mesh, this property's value is added to the path distance used to determine the shortest path.

NavigationLayersProperty
# NavigationLayers
C#
public uint NavigationLayers { get; set; }

A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with NavigationServer3D.MapGetPath.

NavigationMeshProperty
# NavigationMesh
C#
public NavigationMesh NavigationMesh { get; set; }

The NavigationMesh resource to use.

TravelCostProperty
# TravelCost
C#
public float TravelCost { get; set; }

When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with NavigationRegion3D.TravelCost for determining the shortest path.

UseEdgeConnectionsProperty
# UseEdgeConnections
C#
public bool UseEdgeConnections { get; set; }

If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.

Methods21

BakeNavigationMeshvoid
# BakeNavigationMesh
C#
public void BakeNavigationMesh(bool onThread = true);

Bakes the NavigationMesh. If on_thread is set to true (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new NavigationMesh. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as Web with threads disabled).

Parameters
NameTypeDefault
onThreadbooltrue
GetBoundsAabb
# GetBounds
C#
public Aabb GetBounds();

Returns the axis-aligned bounding box for the region's transformed navigation mesh.

Returns Aabb
GetEnterCostfloat
# GetEnterCost
C#
public float GetEnterCost();
Returns float
GetNavigationLayerValuebool
# GetNavigationLayerValue
C#
public bool GetNavigationLayerValue(int layerNumber);

Returns whether or not the specified layer of the NavigationRegion3D.NavigationLayers bitmask is enabled, given a layer_number between 1 and 32.

Parameters
NameTypeDefault
layerNumberint—
Returns bool
GetNavigationLayersuint
# GetNavigationLayers
C#
public uint GetNavigationLayers();
Returns uint
GetNavigationMapRid
# GetNavigationMap
C#
public Rid GetNavigationMap();

Returns the current navigation map Rid used by this region.

Returns Rid
GetNavigationMeshNavigationMesh
# GetNavigationMesh
C#
public NavigationMesh GetNavigationMesh();
Returns NavigationMesh
GetRegionRidRid · Deprecated
# GetRegionRid
C#
public Rid GetRegionRid();

Returns the Rid of this region on the NavigationServer3D.

Returns Rid
GetRidRid
# GetRid
C#
public Rid GetRid();

Returns the Rid of this region on the NavigationServer3D. Combined with NavigationServer3D.MapGetClosestPointOwner can be used to identify the NavigationRegion3D closest to a point on the merged navigation map.

Returns Rid
GetTravelCostfloat
# GetTravelCost
C#
public float GetTravelCost();
Returns float
GetUseEdgeConnectionsbool
# GetUseEdgeConnections
C#
public bool GetUseEdgeConnections();
Returns bool
IsBakingbool
# IsBaking
C#
public bool IsBaking();

Returns true when the NavigationMesh is being baked on a background thread.

Returns bool
IsEnabledbool
# IsEnabled
C#
public bool IsEnabled();
Returns bool
SetEnabledvoid
# SetEnabled
C#
public void SetEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetEnterCostvoid
# SetEnterCost
C#
public void SetEnterCost(float enterCost);
Parameters
NameTypeDefault
enterCostfloat—
SetNavigationLayerValuevoid
# SetNavigationLayerValue
C#
public void SetNavigationLayerValue(int layerNumber, bool value);

Based on value, enables or disables the specified layer in the NavigationRegion3D.NavigationLayers bitmask, given a layer_number between 1 and 32.

Parameters
NameTypeDefault
layerNumberint—
valuebool—
SetNavigationLayersvoid
# SetNavigationLayers
C#
public void SetNavigationLayers(uint navigationLayers);
Parameters
NameTypeDefault
navigationLayersuint—
SetNavigationMapvoid
# SetNavigationMap
C#
public void SetNavigationMap(Rid navigationMap);

Sets the Rid of the navigation map this region should use. By default the region will automatically join the World3D default navigation map so this function is only required to override the default map.

Parameters
NameTypeDefault
navigationMapRid—
SetNavigationMeshvoid
# SetNavigationMesh
C#
public void SetNavigationMesh(NavigationMesh navigationMesh);
Parameters
NameTypeDefault
navigationMeshNavigationMesh—
SetTravelCostvoid
# SetTravelCost
C#
public void SetTravelCost(float travelCost);
Parameters
NameTypeDefault
travelCostfloat—
SetUseEdgeConnectionsvoid
# SetUseEdgeConnections
C#
public void SetUseEdgeConnections(bool enabled);
Parameters
NameTypeDefault
enabledbool—

Signals and events2

BakeFinishedEvent
# BakeFinished
C#
public event Action BakeFinished;

Notifies when the navigation mesh bake operation is completed.

NavigationMeshChangedEvent
# NavigationMeshChanged
C#
public event Action NavigationMeshChanged;

Notifies when the NavigationMesh has changed.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.