GSAIPath

Extends: Reference

Description

Represents a path made up of Vector3 waypoints, split into segments path follow behaviors can use.

Properties

TypeName

bool

is_open

float

length

Functions

TypeName

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

Property Descriptions

is_open

var is_open: bool

If false, the path loops.

length

var length: float

Total length of the path.

Method Descriptions

create_path

func create_path(waypoints: Array) -> void

Creates a path from a list of waypoints.

calculate_distance

func calculate_distance(agent_current_position: Vector3) -> float

Returns the distance from agent_current_position to the next waypoint.

calculate_target_position

func calculate_target_position(target_distance: float) -> Vector3

Calculates a target position from the path's starting point based on the target_distance.

get_start_point

func get_start_point() -> Vector3

Returns the position of the first point on the path.

get_end_point

func get_end_point() -> Vector3

Returns the position of the last point on the path.

Last updated