rudimentary arrow pickup working

This commit is contained in:
2025-06-26 18:43:51 -05:00
parent 64310b848b
commit 24e531faca
3 changed files with 5 additions and 13 deletions

View File

@@ -33,13 +33,5 @@ func _physics_process(delta: float) -> void:
func pickup_follow(delta):
if follow_target != null:
if spawn_out:
follow_target.arrow += 1
queue_free()
else:
if global_position.distance_to(follow_target.global_position) < .5:
spawn_out = true
else:
var direction_to_player = global_position.direction_to(follow_target.global_position)
var distance_to_player = global_position.distance_to(follow_target.global_position)
global_position += global_transform.basis * direction_to_player * (5 + distance_to_player * 3) * delta
follow_target.arrows += 1
queue_free()