villager animations
This commit is contained in:
parent
b310830c9d
commit
429b91facf
|
@ -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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue