Closed voiddat closed 2 years ago
Hello! The orthographic camera should have no effect. I'm not all that familiar with three mesh line but from what I can see it looks like a shader is used to distort the geometry which is not supported by the BVH library -- this is likely why a custom MeshLineRaycast function is provided by the original library.
Hello, I have trouble running your raycasting with OrthographicCamera. Im using https://github.com/spite/THREE.MeshLine - basically wrapper for BufferGeometry with shader - up to 10-20k of them merged in several groups (let's say 5-10 merged geometries with 1-5k groups). It has it's own MeshLineRaycast. This implementation is pretty slow - 300ms per raycast on 15k geometries prevents me from achieving proper UX, therefore I'm thinking about BVH. It basically looks like this - lots of polygons on plane (2D).
My code:
All geometries have boundsTrees (computed after merge), but the program returns null at box intersection (intersects array is always empty regardless if it's cast on line or not). MeshLineRaycast implementation works with this setup, am i missing something? Or perhaps my tech stack isn't compatible with BVH? There are no examples with OrthographicCamera - does it work with your BVH implementation?
Thanks in advance, the code and examples are impressive :)
Regards