C# Octree help?

Hey everyone!

I’m working on a gravity simulation. Currently trying to implement an octree to help optimize the scene so I can create something similar to what the creator of this project has done:

https://vimeo.com/76664667

This unity project was helpful, however I’m not strong enough in c# to tailor this octree to my needs…

http://www.youtube.com/watch?v=CgnaGBDARPg

If anyone is able to write an octree in its most basic form and possibly a brief description of how I may access data from the individual objects using it as big blue boo has within the 1st link, it would be greatly appreciated :slight_smile:

Also any links that may address this already I’d be happy to check out as well

If it helps I believe I’m looking for an octree capable of neighbor finding, though I’m still unsure of how I’d apply this technique…

Probably way too late, but I wrote a general-purpose octree for my game Scraps, and it’s available on GitHub here: GitHub - Nition/UnityOctree: A dynamic, loose octree implementation for Unity written in C#