ladder kiiiiind of works

This commit is contained in:
Derek
2024-07-28 01:10:09 -05:00
parent e324ce829a
commit 1b883866da
4 changed files with 61 additions and 1 deletions

24
scripts/ladder.gd Normal file
View File

@@ -0,0 +1,24 @@
extends Node3D
var is_climbing = false
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_area_3d_body_entered(body):
if body.is_in_group("player"):
is_climbing = true
body.lader_collide(is_climbing)
func _on_area_3d_body_exited(body):
if body.is_in_group("player"):
is_climbing = false
body.lader_collide(is_climbing)