2020-01-29 17:04:04 +01:00
|
|
|
# Calculates acceleration to take an agent away from where a target agent is
|
|
|
|
# moving.
|
2020-04-03 02:31:59 +02:00
|
|
|
# @category - Individual behaviors
|
2020-02-11 18:33:25 +01:00
|
|
|
class_name GSAIEvade
|
|
|
|
extends GSAIPursue
|
2019-12-17 05:12:18 +01:00
|
|
|
|
2019-12-16 17:22:03 +01:00
|
|
|
|
2020-02-14 17:35:18 +01:00
|
|
|
func _init(agent: GSAISteeringAgent, target: GSAISteeringAgent, predict_time_max := 1.0).(
|
|
|
|
agent, target, predict_time_max
|
|
|
|
):
|
2019-12-16 17:22:03 +01:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2019-12-19 20:04:08 +01:00
|
|
|
func _get_modified_acceleration() -> float:
|
2020-01-22 17:55:49 +01:00
|
|
|
return -agent.linear_acceleration_max
|