3 ms·
> The sort of thing you'd solve in 30 seconds with Google in 2024. I’ve implemented this in my own games and I remember that the solution was basically raycast
by klodolph 2y ago
> The sort of thing you'd solve in 30 seconds with Google in 2024.
I’ve implemented this in my own games and I remember that the solution was basically raycasting. But it was NOT some 30 seconds thing. It was a major effort anyway.
(There are of course other options, like rendering a picture with a different color for each object, and sampling the color to figure out what you clicked on. And “color” may just be a 1-channel integer object ID.)