bartofzo / NativeTrees

Burst compatible Octree and Quadtree for Unity
MIT License
294 stars 22 forks source link

[Question] How to adapt the native octree for 3D navigation, #8

Closed Kulgann closed 2 weeks ago

Kulgann commented 1 month ago

Hey, I'm trying to adapt the native octree to be used as a 3D pathfinding structure for our game. What I need to do is insert all the AABB's of our scene into it and somehow mark the nodes that still intersect a object at max depth as impassable. Do you have a suggestion on how to proceed ? I'm sorta getting lost in the API. Thank you in advance for your time and effort.

bartofzo commented 2 weeks ago

I don't think this is suitable to use as a structure for pathfinding directly, at least not without a lot of changes. So I can't help you there unfortunately.

I did however build a pathfinding library myself that utilizes this in a navigation mesh, where it is used to accelerate raycast queries to see where an agent is currently:

https://assetstore.unity.com/packages/tools/behavior-ai/anypath-213200

Good luck!