23 lines
482 B
GDScript
23 lines
482 B
GDScript
extends Area3D
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
pass
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta):
|
|
pass
|
|
|
|
func _on_body_entered(body):
|
|
if body.is_in_group("player"):
|
|
body.is_climbing = true
|
|
body.global_position.y += .1
|
|
|
|
|
|
func _on_body_exited(body):
|
|
if body.is_in_group("player"):
|
|
body.is_climbing = false
|
|
body.gravity = body.default_gravity
|
|
body.ladder_center = null
|