I’m building an RTS and when the user double clicks an Actor I need to select all Actors in the view port. How do you get all actors currently shown in the view port? What’s the best way to do this?
The two approaches I can think of is:
- Use line traces that use the view port corners to draw a box/line trace in the world and get the actors that are in the area of that box.
If this is the approach to take, how would I get the view port corners and then translate them to world locations?
OR
- Use a collision component in my CameraPawn actor and resize the collision box on the X & Y axis as the camera is zoomed in/out.