I’m trying to implement a drag based multi select feature. I had previously done this using the pc picker but now we’re instancing our meshes so this method doesn’t give us the right entities anymore (not to mention it’s not great performance wise).
My idea on how to build this is to create a custom frustum based on the rectangular drag area on the screen and then conduct intersection tests for all entities in the scene based on this frustum. I’d probably use bounding sphere for the first pass and do some higher res intersection test if the bounding sphere intersects the frustum.
I’ve been struggling to get the frustum setup properly. I have the 4 rectangular touch coordinates in screen space for the drag and have been trying to create a new frustum from a mat4 but haven’t figured it out yet.
Would love some pointers or suggestions on other approaches to this issue.