Is there available to get intersectsMesh with using of octree?

I did not found suitable method with Octree to get interectsMesh. As I guess it should be possible to use octree optimization for interectsMesh.
I have a scene with a lot of meshes, and when I run interectsMesh() to every mesh with my target, it took too much time. I think it should be much faster if we will first check intersects with the Octree groups.
But even Octree does not contain such a method, maybe it has some way to get bounding info of every block? Or this task is out of scope for Octree?

Hello! You can check a bounding sphere’s intersection with the octree: Octree | Babylon.js Documentation (

Yep, but it’s just a special case, I looking for check by bounding box.
In my case I have very long cone and use sphere intersection is not best case.

Sphere around the cone looking like this:

Oh I see, unfortunately we only have sphere selection currently

Ok, so it’s probably target to next PR :slight_smile:

And one question more, does exist some opportunity to visalize current octree? Via Inspector for example?

We also don’t have that currently it would be an amazing contribution :smiley:

1 Like