by add food I assume you mean spawning the food in the level. If that’s the case then you want to spawn a separate actor rather than a component since all components within the actor will be part of the snake and won’t collide with it. If you spawned it as a separate actor you could also check if it was food by casting it to food, if it fails the cast its not of that type of actor and is not food.
I am trying to make my Greedy Snake Game these days. first, I defined snake and its Event ActorBeginOverlap, then, I define a function addFood in the level BP and return a static mesh called food. When I compare food to the ‘other actor’ returned by snake ActorBeginOverlap, they are never equal, even when the snake ate the food, and I cannot understand this. Is my solution wrong ? How can I know when the snake eat the food?