The way I understood it- was that if you create a bvhtree from bmesh, you could specify an epsilon ‘offset’ factor that would allow you to use the other bvhtree utilities, such as find_nearest, raycast, etc.
I’m sure I’m just not understanding it correctly, because the behavior I’m seeing is not consistent with that description. In the following example, I’ve set up a super basic GL line test that changes color when a raycast comes back with valid data. As you can see, it starts out fine- as I move the mouse around the perimeter of the mesh, the line turns green indicating a successful ray hit, but as I work my way around the mesh, you can see that the rays are failing in certain areas where they should be hitting.
I’m creating my bvhtree from a bmesh on operator invoke, using an epsilon of .5, and doing a simple ray_cast using the view vector derived from region_2d_to_vector_3d in modal mousemove. I just don’t understand it! Hoping somebody here can shed some light, I’m new to using bvhtree , and assuming I can get it working the way I want I have a ton of cool ideas for how to use it in the future.