fx: rotation wrapping interaction bug
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user