[Resolved] Checking raycast on multiple objects

Hello,
I am working on a project where i want the player to interact with multiple objects, maybe hundreds. Where i can’t find a solution is for the many different interactions. Here, for example, i have a key, the player can pick it up, there is a button that the player can press to activate a cutscene, a monster with dialogs, and there are sprites which shows some text on screen. But each object has to be activated when the raycast hits them. So when the raycast hits something, it has to check if it is one of the many blueprint classes and call their function.
But i don’t think checking for each class is a good idea, it doesn’t look good and i can’t find another way…
I can’t loop because when i need to access the “Raycast Function” function inside of these blueprints, it requires a reference. So, if i had hundreds of interactions in the game, the blueprint would be massive and will check if the object is one of the others before.

You’re looking for this:

Awesome! It works perfectly, thank you :slight_smile: