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?