findEntities() find objects outside search sphere


#1

Testing the findEntities() function. it works. But after some puzzle. I come to the conclusion that findEntities() is finding more then you expect. some entities are outside the search area. 0.5 meters. Also 0.0 meters still did show more then expected.

The objects it also find are the skybox, and my test terrain that is 1023x153,1023 meters in size. Not a big pain , because you add some filter. But it still outside the radius sphere.


New findEntitiesExample
#2

This is due to the fact that findEntities will return all the entities that “touch” the sphere, not only the one fully contained.


#3

And this is good! Necessary for many pathfinding, collision avoidance scenarios.


#4

Good to know, but good to have in documentation too ! if it’s not already there.