villager animations

This commit is contained in:
Spencer Killen 2023-08-19 20:45:30 -06:00
parent b310830c9d
commit 429b91facf
Signed by: sjkillen
GPG Key ID: F307025B65C860BA
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,7 @@ func _process(_delta):
match task: match task:
"idle": "idle":
idle()
task = rng.randf_range(0, 100) task = rng.randf_range(0, 100)
# 3% chance to walk somewhere. # 3% chance to walk somewhere.
@ -51,6 +52,7 @@ func _process(_delta):
task = "idle" task = "idle"
"walk": "walk":
walk()
# Get the direction to the target in z-x plane. # 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() target_direction_xz = (location_xz.direction_to(target_location_xz) * Vector3(1, 0, 1)).normalized()