Route

Route objects can be created by either linking an existing Path asset (kManualPath) or can be directly computed using the Navigation data attached the Scene where the Object resides (kPathfinding).

See Also

Static Variables


Name Description
object Parent Object where the Route is contained.
path Reference to the current Path Asset connected to the Route (if any).
pathfinding Reference to the Pathfinding data associated to the Route (kPathfinding only).

Variables


Name Description
route_type The current RouteType used by the Route.

Functions


Name Description
SetPath Set a Path of predefined control points.
BuildPath Evaluate new Route control points based on active Pathfinding settings.
GetClosestPoint Return the closes point on the Route.
GetClosestPointIndex Evaluate new Route control points based on active Pathfinding settings.
Evaluate Return a relative point on the Route based on a specific time.
GetPointAt Retrieve a specific point on the Route by index.
GetPointCount Return the current amount of control point stored for the active Route.
GetLength Return the total length of the active Route.
SelectPointAt Control the selection state of a single point on the active Route.
IsPointSelected Return the active selection state of a single point.
SetPointAt Change the current location of a point on the active Route.

Pathfinding


Settings available when the RouteType is set to kPathfinding. Remember to call the BuildPath function to rebuild the control points data based on the new settings.

Variables


Name Description
map Unique id of an existing Map that will be use to build the Route.
target Unique id of an existing Object to use as target.
end_point The end point to use to rebuild the Route.
target Active distance between the Route pivot and the end point.
ability_mask Bit mask of Ability caps that should be use for the pathfinding query.
max_points Control the maximum limit of control points that should be generated by the pathfinding query.
option Bit mask of MapPathOption to use for the pathfinding query.
flags Bitmask of PathfindingOptions affecting both the behavior and construction of the Path.
option Frequency rate the MapPath will be re-evaluated.

RouteType


Available types of Route.

  • kManualPath: Use a Path Asset to define the Route control points.
  • kPathfinding: Dynamic path generated from a predefined Map.

PathfindingOptions


Available options when the Route type is set to kPathfinding.

  • fConnectionUpdate: Recaculate the MapPath upon Connection changes.
  • fObstacleUpdate: Recaculate the MapPath is an Obstacle have been updated, added or removed.
  • fZoneUpdate: Re-evaluate the MapPath is any changes are applied on Zone.
  • fStitchPath:Force the pathfinding query to stitch junctions controls points allowing the query to travel multiple Map.
  • fSmoothPath:Create a smooth Bezier curves using the path resulting control points; else the path will be linear.




NRG - API 2022.4.384543 - Fri Nov 4 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA