I need to implement player action menu where player can select what to do based on environment.
All the words and positions are supplied by environment in a form of
and some of these nodes can be moving, created or removed. All I need to do is make list of these nodes which are close (like 1m or 2m) to the player character and display them on screen as labels (or ImGUI windows) for player to be able to select one to use (or come closer to one). All I need is to egt the list to show as fast as possible. The number of nodes is from 1000 to 10000 but it would be best if solution would scale. And no, brute force approach with checking distance doesn't work too well. Any ideas how to do it effectively enough without digging too much of CS and making custom large data structures and spending months debugging? Kind of something I could do over weekend? All suggestions are appreciated.
What I currently done is creating a set of physics bodies sensors and add action to the list on entering and removing on exiting, the performance is much better than brute force approach but flexibility is bad as I can't display some nodes at distance as hint and also the performance could be better too (1000s of collision bodies/shapes).