I’m using ARcore to spawn prefabs on detectedplanes. The prefabs overlap eachother and thats okay. When a certain number of them reach a certain concentration, I’d like to coalesce them into a different prefab, placed on that detectedplane, somewhere in the middle of the group.
My thinking is, if I had a list of these instantiated prefabs, and if I could calculate the distances between their closest neighbors, I could know the concentration.
So I need help on two things.
- How to get a list of existing prefabs to calculate distances between eachother
- How to destroy prefabs.
There is no tapping of the screen, my users will not be selecting individual prefabs.
Anyone able to help out?