Hoping this question and explanation makes sense: I have a bunch of entities with a Position component, where every unit of Position translates to 0.25 units in regular coordinates, so the end result is that the world is divided into a set of 3D cubes that are 0.25 units wide.
I want to select an entity located at an arbitrary Position with the mouse, which presumably means casting a ray until it intersects with a cube containing a selectable entity. What's the right way to do this? I know there's Camera::viewport_to_world(), but all the explanations about intersections with planes and I don't know how to adjust that to this system in a way that isn't jank.
(Also unsure how to select entities that are behind other entities, but that might be a design problem... if anyone has advice on that, it would be appreciated too. ^^" )