Best practices for octree-optimized collision detection

The scene-level octree is used for frustum culling, not for collision detection. You should use mesh-level octrees to speed up collision detection.

Regarding point 2/, octrees only work if the object you are testing collisions against is static: the octree is created in the world coordinate system, if you move the object after its creation, the octree will not fit it anymore:

You can see that the octree is displayed at the position of the sphere (origin of the coordinate system) when the octree was created, not where the sphere actually is.

In this PG, if you move the sphere itself, it will work (uncomment line 84), because the collision system will test all the other objects in the scene with the sphere, and the octree of the sphere will not be used: in this case, we check the ellipsoid of the sphere with the other object geometries.

But in the opposite case (uncomment line 85 instead of 84), if you move the box, the system will check the ellipsoid of the box with the sphere, and since the sphere uses an octree for collision, it will use it. But the octree was created when the sphere was at the origin, so the collision detection will fail and the box will pass through the sphere.