Three.js: Mesh.raycast does not sort intersections as the documentation states

Created on 28 May 2018  路  4Comments  路  Source: mrdoob/three.js

The results are not sorted in close-to-far order. I can't seem to find anything in the code trying to sort the result.
Am I missing something?

Documentation Enhancement

Most helpful comment

16034

Made a pull request.
First PR here!

All 4 comments

Sorting is performed in Raycaster.intersectObjects() and Raycaster.intersectObject().

Oh, ok, I was looking at the wrong place!
It would nice if the documentation of Mesh.raycast could state explicitly that the result is not ordered. Thanks!

16034

Made a pull request.
First PR here!

@amitlzkpa welcome aboard!

Was this page helpful?
0 / 5 - 0 ratings