You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding near and far to the intersectRay function would avoid recursively checking many bvh nodes when raycasting.
It will require a change in the API.
I did a test by setting raycaster.far = 0.1 from raycast example page and of course it is super fast.
It would also be useful to edit the raycast example page by adding near and far in the GUI (which will also change the length of the drawn lines) and to use InstancedMesh so that raycasting can be tested better (too many drawcalls are a bottleneck).
The text was updated successfully, but these errors were encountered:
This would be a good change - currently I think the raycast results may even be incorrect if raycaster.near or far are modified.
It will require a change in the API.
I think we can just add near and far arguments to the .raycast and .raycastFirst functions - it shouldn't be breaking.
It would also be useful to edit the raycast example page by adding near and far in the GUI
If we do this lets change the ray lengths to help show the difference in what's happening.
use InstancedMesh so that raycasting can be tested better (too many drawcalls are a bottleneck).
I've been meaning to do this but have never had time. Help would be great! The bvh raycasting demo I added to three.js uses InstancedMesh for the spheres and updates a LineSegments class for all the lines.
Adding
near
andfar
to theintersectRay
function would avoid recursively checking many bvh nodes when raycasting.It will require a change in the API.
I did a test by setting raycaster.far = 0.1 from raycast example page and of course it is super fast.
It would also be useful to edit the raycast example page by adding
near
andfar
in the GUI (which will also change the length of the drawn lines) and to useInstancedMesh
so that raycasting can be tested better (too many drawcalls are a bottleneck).The text was updated successfully, but these errors were encountered: