ft (wip): tracking across boundaries

This commit is contained in:
2026-02-07 18:01:17 +01:00
parent 0f06846157
commit bc582efb90
12 changed files with 93 additions and 43 deletions

View File

@@ -11,7 +11,7 @@ func enter(previous_state_path: String, data := {}) -> void:
finished.emit(owner.fsm.States.IDLE, {})
func physics_update(_delta: float) -> void:
if owner.position.distance_to(threat.position) > threshold or threat == owner:
if GameManager.calc_distance(owner.position, threat.position) > threshold:
finished.emit(owner.fsm.States.IDLE, {})
return
owner.move(flee_from(threat.position))