breadwinner/entities/pickupable/pickupable_item.gd

18 lines
487 B
GDScript3
Raw Normal View History

@icon("res://addons/at-icons/node3d/hand.svg")
2026-08-13 23:44:29 +02:00
class_name PickupableItem extends RigidBody3D
# The @export_file tag creates a folder icon in the Inspector
# that only lets you select saved .tscn files!
@export_file("*.tscn") var scene_path: String
@export var mesh: MeshInstance3D
@export var collision: CollisionShape3D
var weight: float = 10.0
func _ready() -> void:
2026-08-13 23:44:29 +02:00
self.add_to_group("pickupable")
for x in get_children():
2026-08-13 23:44:29 +02:00
x.add_to_group("pickupable")
collision_layer = 17