Get Overlapping Actors not working with specific class

Oh my god I’m a moron, I forgot in my construction script I had been setting affected entities! Thanks for your help I think I will use this instead of what I have been doing!

I am trying to detect when objects of certain classes are within a trigger box for a blueprint, when I set overlapping actors with the class filter set to “Actor” I get overlap events that generate, however when I specifically set the class filter to be one of the actor classes that is in the area it does not recognize it, is something wrong?

The classes do get added to the array when the class filter is set to actor, but not when it is one of the specific classes

324810-image-2020-12-14-174456.png

Hi Coolrooman

I am not entirely sure what is going on with your logic. However, perhaps I can suggest some better alternatives to what you’re trying to achieve.

The trigger knows when an object enters or leaves, therefore there is no need to cycle all the overlapped actors to validate what is currently overlapped.

Looking at your example, I added an array variable called “ObjectsOverlapped” inside a pawn (not the best class to use) and everything else was done on the trigger itself.

You simply this further by setting up the collision channels appropriately (or even add your own). This way won’t need to care about the classes at all, since you will be specifically telling the trigger what it can and cannot detect. This would be the most optimal solution.

I hope this helps. Good luck!

Alex.

1 Like