marijnz / NativeOctree

An Octree Native Collection for Unity DOTS
MIT License
179 stars 22 forks source link

AABB Version? #3

Open Guedez opened 3 years ago

Guedez commented 3 years ago

Can you make a version that 'indexes' the elements by an AABB bound rather than a Point? I've tried to convert this myself a couple of times over the months, but I couldn't figure out those MortonCodes things

marijnz commented 3 years ago

Hey,

I did an experiment like this on the 2d version. Maybe have a look and let me know if it helps. I'm not sure if this it a good idea though, especially in 3d it's probably too wasteful.

https://github.com/marijnz/NativeQuadtree/tree/experiment_rects