Skip to main content

Spacial Hash KNN

For each entity finds maximum of MaxNumNeighbors within radius MaxNeighborDistance. It's also possible to limit the field of view with MaxFOV. Functionally it is exactly the same as KDTreeKNNJobWrapper. The only difference is in the data structure used. Usually, spacial hashing provides better performance, but proper profiling is always necessary.

tip

Neighbor queries can easily cost most of the resources needed to run a steering system. Try to limit the MaxNumNeighbors and MaxNeighborDistance to minimum.