diff --git a/godot/Villager.gd b/godot/Villager.gd index b95fd56..b637160 100644 --- a/godot/Villager.gd +++ b/godot/Villager.gd @@ -34,6 +34,7 @@ func _process(_delta): match task: "idle": + idle() task = rng.randf_range(0, 100) # 3% chance to walk somewhere. @@ -51,6 +52,7 @@ func _process(_delta): task = "idle" "walk": + walk() # Get the direction to the target in z-x plane. target_direction_xz = (location_xz.direction_to(target_location_xz) * Vector3(1, 0, 1)).normalized()