mirror of
https://github.com/Relintai/godot-steering-ai-framework.git
synced 2024-12-28 09:47:16 +01:00
16cc3efb43
Fixes #45
20 lines
488 B
GDScript
20 lines
488 B
GDScript
extends Node2D
|
|
|
|
const COLORS := {
|
|
deceleration_radius = Color(1.0, 0.419, 0.592, 0.5),
|
|
arrival_tolerance = Color(0.278, 0.231, 0.47, 0.3)
|
|
}
|
|
|
|
var arriver: Node2D
|
|
|
|
|
|
func _ready() -> void:
|
|
yield(owner, "ready")
|
|
arriver = owner.arriver
|
|
|
|
|
|
func _draw():
|
|
var target_position := GSAIUtils.to_vector2(arriver.target.position)
|
|
draw_circle(target_position, owner.deceleration_radius, COLORS.deceleration_radius)
|
|
draw_circle(target_position, owner.arrival_tolerance, COLORS.arrival_tolerance)
|