Scripting API

Scripting API

NavMeshObstacle2D

Struct in Abyss.Navigation, from Abyss.Navigation.

Something NavMeshAgent2Ds go around while the game plays, in 2D: a cart pushed into a doorway, a gate that closes. While it moves, the agents near it steer around it as they steer around each other; with NavMeshObstacle2D.Carve it is cut out of the navmesh once it has stood still for NavMeshObstacle2D.TimeToStationary, so paths are planned around it.

public struct NavMeshObstacle2D

Remarks

Its shape is where its entity's GlobalTransform puts it, scaled and turned as the entity is.

Constructors

public NavMeshObstacle2D()

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

Fields

Shape

public NavMeshObstacleShape2D Shape

Its shape.

Center

public Vector2 Center

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

Size

public Vector2 Size

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

Radius

public float Radius

A circle's radius, 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 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.