Unity Trick: Find closest Object fast! (k-d Tree)

Опубликовано: 23 Март 2026
на канале: DitzelGames
61,116
1k

Here is a k-d Tree implementation for Unity: https://gist.github.com/ditzel/194ec8...

The k-d tree is a data structure for a fast search in 3D space. I implemented and adopted it to the need of a unity developer. You can find the nearest object to a given position very fast.

This is especially interesting for mobile applications.

More information: https://en.wikipedia.org/wiki/K-d_tree