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 NavMeshObstacle2DRemarks
Its shape is where its entity's GlobalTransform puts it, scaled and turned as the entity is.
Constructors
NavMeshObstacle2D
public NavMeshObstacle2D()A box a unit each way, not cut out of the navmesh.
Fields
Shape
public NavMeshObstacleShape2D ShapeIts shape.
Center
public Vector2 CenterIts middle, from its entity's, in the entity's units.
Size
public Vector2 SizeA box's size each way, in the entity's units.
Radius
public float RadiusA circle's radius, in the entity's units.
Carve
public bool CarveWhether it is cut out of the navmesh, so paths go around it.
MoveThreshold
public float MoveThresholdHow far it moves before it is moving: a carved one is cut again where it is.
TimeToStationary
public float TimeToStationaryHow long it stands still, in seconds, before it is cut out of the navmesh.
CarveOnlyStationary
public bool CarveOnlyStationaryWhether it is cut out only once it stands still; off, it is cut out again wherever it moves.
