fx: rotation wrapping interaction bug

This commit is contained in:
2026-02-01 12:57:45 +01:00
parent 6432b709ef
commit 07f3c13fd2
3 changed files with 17 additions and 30 deletions

View File

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