GSAIPriority

Extends: GSAISteeringBehavior

Description

Container for multiple behaviors that returns the result of the first child behavior with non-zero acceleration.

Properties

TypeName
intlast_selected_index
floatzero_threshold

Methods

TypeName
voidfunc add(behavior: GSAISteeringBehavior) -> void
GSAISteeringBehaviorfunc get_behavior_at(index: int) -> GSAISteeringBehavior

Property Descriptions

last_selected_index

var last_selected_index: int

The index of the last behavior the container prioritized.

zero_threshold

var zero_threshold: float

If a behavior’s acceleration is lower than this threshold, the container considers it has an acceleration of zero.

Method Descriptions

add

func add(behavior: GSAISteeringBehavior) -> void

Appends a steering behavior as a child of this container.

get_behavior_at

func get_behavior_at(index: int) -> GSAISteeringBehavior

Returns the behavior at the position in the pool referred to by index, or null if no behavior was found.