pretty happy with ladder movement right now

This commit is contained in:
derek
2025-01-17 16:04:03 -06:00
parent 5eb065830a
commit f74d599b64
11 changed files with 111 additions and 80 deletions

View File

@@ -1,5 +1,7 @@
extends Area3D
@onready var collision_midpoint: Node3D = $CollisionMidpoint
# Called when the node enters the scene tree for the first time.
func _ready():
pass
@@ -11,9 +13,8 @@ func _process(delta):
func _on_body_entered(body):
if body.is_in_group("player"):
body.velocity = Vector3(0,0,0)
body.is_climbing = true
if body.global_position.y < global_position.y:
if body.global_position.y < collision_midpoint.global_position.y:
body.global_position.y += .2
@@ -21,4 +22,3 @@ func _on_body_exited(body):
if body.is_in_group("player"):
body.is_climbing = false
body.gravity = body.default_gravity
body.ladder_center = null