Pick up (walking over) and check for item (needed for pickup)

Hi, once again i need help, sorry.
I’m trying to achieve that the player needs a Item (Hacke) in order to pick up the “roteGem” in my code. neither is working but in other game it works like in the code. i tried the tags, i tried debug los (game finds the tag, first one and i don’t know how to check for all gems) i tried trigger at player, i tried trigger at gems. neither is working. now i’m at my wits end and would appreciate every help i can get.
i attach screenshots with the settings in unity and the other side the code




1 Answer

1

Removed all triggers and changed DestroyImmediate to Destroy.
Somehow it works now. Don’t know why but it works…

ERRATA:

DestroyImmediate is for Editor-only use, to destroy objects outside Play mode.
Destroy is for Play mode (when game is playing).