Get Actors in Selection Rectangle ignore/use specific collision channels?

I am making an RTS game and I have character based unit blueprints which have all the normal character elements, and additionally have a large sphere collision which acts as their range detection.
I also have a marquee selection function in the HUD, mainly using Get Actors in Selection Rectangle to get the overlapping actors and add them to the selection. The issue is that it picks up the sphere collisions as the actor, and therefore adds units to the selection that are way outside the rectangle.
How would I further filter that result to check for either specific components, or have it do a collision trace? I have a box around the unit that is for selection with a custom ā€˜interactableā€™ channel on it.
I found one answer involving C++ but I A) want to keep it in blueprints as much as possible and B) donā€™t have access to C++ for this project, my visual studio is messed up.

So my question is:
A) can I do a ā€œGet Components in Selection Rectangle?ā€
B) or can I get actors based on a collision channel trace?
C) is there another way to do the same thing that doesnā€™t involve this method?


Setting a componentā€™s ā€œUse Attach Parent Boundā€ to true has fixed this issue for me in the past. This way you donā€™t need to change any code. Hope that helps!

7 Likes

My god you are the best! That worked like a charm thank you so much! This has been eating at me for days.

1 Like

My hero! I have been struggling with this for longer than i want to admit!

awesomeā€¦