I am trying to make soccer game in unreal blueprints. I have a collison box in the goals, but how do you make it so they only react to my game ball, nothing else.
Thank you so much.
Update%
I thank everyone for their responses. I think I should explain my question better. I want it so if the ball enters the goal( collison box ), it will fire an event. If a player enters the goal, I want nothing to happen. How do I do that?
you need to make something like the one who touched the ball the last, in that way you can make a sort of tag for the ball to change everytime a rival touch it, a tag name for enemy/player and one for yours
In my game I store 4 references in the ball. Well a few more for other reasons.
Last touched red/blue and last assist red/blue.
These are playerstate references.
When a player hits the ball it sets the last assist if valid to last touched and sets lasts touched to the new player if it’s not the same playerstate. If they are on opposite teams the assists and cleared and last touch is set.
When ball goes in the goal it grabs the last touched and assist if valid to assign a point
For scoring the goal volume has a on begin overlap cast to ball on do once to give team a point and destroy itself. My game mode checks in tick to see if ball is valid when it’s not it spawns a new one.