extends RigidBody3D

@export var item : Item
@onready var interactable : Interactable = $Interactable
@onready var is_interactable : bool = true


@rpc("any_peer", "call_local")
func pickup_item(player_id : int, item_name : String):
	print(item_name, "penis")
	# var item = get_node(item_name) as RigidBody3D
	# item.set_controller(item_holster_one)
	freeze = true
	collision_layer = 0
	hide()
	change_authority.rpc_id(1, player_id)

@rpc("any_peer", "call_local")
func change_authority(player_id : int):
	if not is_multiplayer_authority():
		return 
	set_multiplayer_authority.call_deferred(player_id)
