Godot Version
godot 4
Question
I’m working on a script for the player in my game to pick up items.
currently this is what I have so far:
func _pickUp():
if Ray.is_colliding():
var obj = Ray.get_collider();
if (obj.is_in_group("ItemPickups")):
Item = obj
add_child(Item)
Item.freeze = true
this function is called then the player hits a key. for some reason this does… literaly nothing. in theory it checks the raycast collider and if it’s in the item pickup group it parents it to the object this script is on but right now it just kinda… sits there? why doesn’t this work