PathWaypoint
The PathWaypoint data type constructed by a Enum.PathWaypointAction action, Vector3 position, and string label which is used by the PathfindingService to create points along a generated path.
The code block below constructs a PathWaypoint variable with Vector3.new(10, 10, 10) as its position, Enum.PathWaypointAction.Walk as its action, and Custom Label as its label:
local pos = Vector3.new(10, 10, 10)local waypoint = PathWaypoint.new(pos, Enum.PathWaypointAction.Walk, "Custom Label")
PathWaypoint can also be constructed by passing position and action. Label property will be set to default as empty string.
local pos = Vector3.new(10, 10, 10)local waypoint = PathWaypoint.new(pos, Enum.PathWaypointAction.Walk)
Action
The Action describes the action to take in order to reach this PathWaypoint. It can be set to one of the following enum values:
Name | Value | Description |
---|---|---|
Walk | 0 | Walk action needed to reach this waypoint from the previous one. |
Jump | 1 | Jump action needed to reach this waypoint from the previous one. |
Résumé
Constructeurs
- new(position : Vector3,action : Enum.PathWaypointAction,label : string)
Constructeurs
new
Paramètres
Propriétés
Label
The name of the navigation area that generates this waypoint. You can use PathwayPoint.Label to decide the custom action to take to reach the waypoint. PathfindingModifier and Material each have a Label. Automatic jump links have "Jump" as their Label.