summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2022-07-23 17:31:29 -0400
committerdusoleil <howcansocksbereal@gmail.com>2022-07-23 17:31:29 -0400
commitba5c6fb244cd579b8c91a5a2dc5a130f5a849db6 (patch)
tree7046ff4466f4fcec403dd20369a0a6c656dddc3b
parentb6efb48931570b19f0be0f5b774b8518f76a2424 (diff)
downloadchicken-chaser-gd-ba5c6fb244cd579b8c91a5a2dc5a130f5a849db6.tar.gz
chicken-chaser-gd-ba5c6fb244cd579b8c91a5a2dc5a130f5a849db6.zip
Little bit of gravity for chickens
-rw-r--r--Chicken.gd2
1 files changed, 2 insertions, 0 deletions
diff --git a/Chicken.gd b/Chicken.gd
index 5d6e9ec..31c6520 100644
--- a/Chicken.gd
+++ b/Chicken.gd
@@ -21,6 +21,8 @@ func roll_die(chance):
return (randf() * 100) <= chance
func _physics_process(delta):
+ if !is_on_floor():
+ move_and_slide(Vector3.DOWN, Vector3.UP)
if chasing:
state_chasing(delta)
return