mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-12-25 01:17:10 +01:00
15 lines
347 B
GDScript3
15 lines
347 B
GDScript3
|
# Calculates acceleration to take an agent away from where a target agent is
|
||
|
# moving.
|
||
|
class_name GSAIEvade
|
||
|
extends GSAIPursue
|
||
|
|
||
|
|
||
|
func _init(agent: GSAISteeringAgent, target: GSAISteeringAgent, predict_time_max := 1.0).(
|
||
|
agent, target, predict_time_max
|
||
|
):
|
||
|
pass
|
||
|
|
||
|
|
||
|
func _get_modified_acceleration() -> float:
|
||
|
return -agent.linear_acceleration_max
|