Files
fps_project_1/scripts/ladder.gd
2024-07-28 01:10:09 -05:00

25 lines
516 B
GDScript

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)