stick-the-quick/test/pick_up_item.gd

10 lines
210 B
GDScript3
Raw Normal View History

2025-03-29 02:44:10 -07:00
extends RigidBody3D
func _ready() -> void:
body_entered.connect(_on_body_entered)
func _on_body_entered(body: PhysicsBody3D) -> void:
if body is Character:
if body.interact_impetus:
2025-03-29 02:44:10 -07:00
body.pick_up(self)