This commit is contained in:
2026-01-21 23:40:20 +01:00
commit d1f8068081
478 changed files with 24902 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
extends Area3D
class_name GrabBox
signal grabbedByPlayer
@export var obj: GrabableObject
@export var type: String #Used to signify the type of Object for other code interacting with the grab box
@export var heavy: bool = false
func _ready() -> void:
set_collision_layer_value(5,true) #Enables Grabing colision layer
set_collision_layer_value(1,false) #Disables Default collision layer
set_collision_mask_value(1,false)
func grab() -> GrabableObject:
if !obj: return
if !obj.isGrabbed:
grabbedByPlayer.emit()
return obj
return null