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:

NameValueDescription
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.

요약

생성자

속성

생성자

new

매개 변수

position: Vector3
기본값: Vector3.new(0, 0, 0)
기본값: Enum.PathWaypointAction.Walk
label: string

속성

The action to perform at this waypoint.

Position

The 3D position of this waypoint.

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.