Download

GetActorsInSelectionRectangle() is really impercise

I have a RTS game where I select players with DrawRect() and GetActorsInSelectionRectangle(). Problem I find is that it’s really far off and it’s causing problems with other stuff. See example photo.
Rectangle is being drawn top left to bottom right and GetActorsInSelectionRectangle() finds the actor with that difference in distance. I assume it has to do with the angle of the camera, maybe? The coordinates I’m putting in are correct, I’m getting mouse position from character controller.

The actor is the base character from Top down example, where capsule component is the parent.