2026-08-13 13:28:13 +02:00
|
|
|
@icon("res://addons/at-icons/node3d/hand.svg")
|
2026-08-13 23:44:29 +02:00
|
|
|
class_name PickupableItem extends RigidBody3D
|
2026-08-09 03:24:28 +02:00
|
|
|
|
2026-08-13 13:28:13 +02:00
|
|
|
# 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
|
|
|
|
|
|
2026-08-09 03:24:28 +02:00
|
|
|
var weight: float = 10.0
|
|
|
|
|
|
|
|
|
|
func _ready() -> void:
|
2026-08-13 23:44:29 +02:00
|
|
|
self.add_to_group("pickupable")
|
2026-08-09 03:24:28 +02:00
|
|
|
for x in get_children():
|
2026-08-13 23:44:29 +02:00
|
|
|
x.add_to_group("pickupable")
|
2026-08-09 03:24:28 +02:00
|
|
|
collision_layer = 17
|