mirror of
https://github.com/Relintai/godot-steering-ai-framework.git
synced 2025-01-26 14:29:19 +01:00
16 lines
347 B
GDScript
16 lines
347 B
GDScript
# Calculates acceleration to take an agent away from where a target agent is
|
|
# moving.
|
|
class_name GSTEvade
|
|
extends GSTPursue
|
|
|
|
|
|
func _init(
|
|
agent: GSTSteeringAgent,
|
|
target: GSTSteeringAgent,
|
|
predict_time_max := 1.0).(agent, target, predict_time_max):
|
|
pass
|
|
|
|
|
|
func _get_modified_acceleration() -> float:
|
|
return -agent.linear_acceleration_max
|