mirror of
https://github.com/Relintai/godot-steering-ai-framework.git
synced 2025-02-08 02:55:55 +01:00
10 lines
361 B
GDScript
10 lines
361 B
GDScript
class_name GDGSAIFlee
|
|
extends GDGSAISeek
|
|
|
|
# Calculates acceleration to take an agent directly away from a target agent.
|
|
# @category - Individual behaviors
|
|
|
|
func _calculate_steering(acceleration: GDGSAITargetAcceleration) -> void:
|
|
acceleration.linear = ((agent.position - target.position).normalized() * agent.linear_acceleration_max)
|
|
acceleration.angular = 0
|