Extends: Reference
Represents a path made up of Vector3 waypoints, split into segments path follow behaviors can use.
Type | Name |
---|---|
bool | is_open |
float | length |
Type | Name |
---|---|
void | func create_path(waypoints: Array) -> void |
float | func calculate_distance(agent_current_position: Vector3) -> float |
Vector3 | func calculate_target_position(target_distance: float) -> Vector3 |
Vector3 | func get_start_point() -> Vector3 |
Vector3 | func get_end_point() -> Vector3 |
var is_open: bool
If false
, the path loops.
var length: float
Total length of the path.
func create_path(waypoints: Array) -> void
Creates a path from a list of waypoints.
func calculate_distance(agent_current_position: Vector3) -> float
Returns the distance from agent_current_position
to the next waypoint.
func calculate_target_position(target_distance: float) -> Vector3
Calculates a target position from the path’s starting point based on the target_distance
.
func get_start_point() -> Vector3
Returns the position of the first point on the path.
func get_end_point() -> Vector3
Returns the position of the last point on the path.