Scripting API

Scripting API

NavMeshObstacle3D

Struct in Abyss.Navigation, from Abyss.Navigation.

Something agents go around while the game plays: a crate pushed into a doorway, a door that closes, a car that parks. While it moves, the NavMeshAgent3Ds near it steer around it as they steer around each other; with NavMeshObstacle3D.Carve it is cut out of the navmesh once it has stood still for NavMeshObstacle3D.TimeToStationary, so paths are planned around it, and a doorway it blocks is no way through.

public struct NavMeshObstacle3D

Remarks

Its shape is where its entity's GlobalTransform puts it, scaled as the entity is; a box turns with the entity about the up axis alone, as the navmesh is cut from above.

Constructors

public NavMeshObstacle3D()

A box a meter each way, not cut out of the navmesh.

Fields

Shape

public NavMeshObstacleShape3D Shape

Its shape.

Center

public Vector3 Center

Its middle, from its entity's, in the entity's units.

Size

public Vector3 Size

A box's size each way, in the entity's units.

Radius

public float Radius

A cylinder's radius, in the entity's units.

Height

public float Height

A cylinder's height, in the entity's units.

Carve

public bool Carve

Whether it is cut out of the navmesh, so paths go around it.

MoveThreshold

public float MoveThreshold

How far it moves, in meters, before it is moving: a carved one is cut again where it is.

TimeToStationary

public float TimeToStationary

How long it stands still, in seconds, before it is cut out of the navmesh.

CarveOnlyStationary

public bool CarveOnlyStationary

Whether it is cut out only once it stands still; off, it is cut out again wherever it moves.