Download

RTS Marquee (Box) Selection

I’m converting two 2D UI coordinates (top left and bottom right) of my selection box into world space, then performing a box trace into the scene using these along the camera’s direction. With a perspective camera, this obviously isn’t ideal. I have a video showing the problem: https://www.youtube.com/watch?v=VT3KrmE2N3g

Is there no frustum-based trace? I would’ve thought PhysX would have one. Are there any other ideas or options that others here have used? A straight box trace is insufficient for any sort of perspective camera + unit selection.

Any help would be appreciated - it’d be great to not have to extract the frustum from the scene view, then perform a manual check against every object in my scene’s spheres (which I would need to have on all of them by default to be able to do this).

Thanks!