Skip to main content
Version: 3.3

struct ModelSettings

(Niantic.Lightship.AR.NavigationMesh.ModelSettings)

Overview

The ModelSettings struct provides a configuration for how LightshipNavMesh scans the real environment and creates a navigable space. An instance of ModelSettings is created by the LightshipNavMeshManager using the parameters specified by the user in the Inspector, and that instance is subsequently used to create a LightshipNavMesh that is configured this way.

struct ModelSettings {
// fields

float TileSize;
float SpatialChunkSize;
int KernelSize;
float KernelStdDevTol;
float MaxSlope;
float MinElevation;
float StepHeight;
LayerMask LayerMask;

// properties

ModelSettings Default;

// methods

ModelSettings(
float tileSize,
float kernelStdDevTol,
float maxSlope,
float stepHeight,
LayerMask layerMask
);
};

Detailed Documentation

The ModelSettings struct provides a configuration for how LightshipNavMesh scans the real environment and creates a navigable space. An instance of ModelSettings is created by the LightshipNavMeshManager using the parameters specified by the user in the Inspector, and that instance is subsequently used to create a LightshipNavMesh that is configured this way.

Fields

TileSize

float TileSize

Size of a grid cell in meters.

SpatialChunkSize

float SpatialChunkSize

Size of a spatial partition in square meters. Grid cells within the same chunk will be stored together.

KernelSize

int KernelSize

The size of the kernel used to compute areal properties for each cell.

.. note::

This needs to be an odd integer.

KernelStdDevTol

float KernelStdDevTol

The standard deviation tolerance value to use when determining node noise within a cell, outside of which the cell is considered too noisy to be walkable.

MaxSlope

float MaxSlope

Maximum slope angle (degrees) of an area to be considered flat.

MinElevation

float MinElevation

Minimum elevation (meters) a GridNode is expected to have in order to be walkable

StepHeight

float StepHeight

The maximum amount two cells can differ in elevation to be considered on the same plane.

LayerMask

LayerMask LayerMask

Specifies the layer of the environment to raycast.

Properties

Default

ModelSettings Default

Constructs a configuration with default settings.