I created one sphere and Points and added to the scene to (0,0,0)
now I want to select these with raycaster. My aim to select all nearby meshes and points within some range.
so I used “params” properties of raycaster.
but It only works with points.
when I clicked on right away on points and mesh. I got result of both intersection.
but when I clicked at some distance I can only got result of Points.
var raycaster = new THREE.Raycaster();
raycaster.params.Mesh.threshold = 20
raycaster.params.Points.threshold = 20
In image white dot it my cursor, Red is Points object, and yellow is my mesh.
in this image black dot is my cursor
It seems that
raycaster.params.Mesh is not actually used by the code. See the result of this source search: Search · params.Mesh · GitHub
If it was used, it should appear in the
raycast() method of the
Mesh object, increasing the size of the bounding sphere and bounding box tests, but it doesn’t: three.js/Mesh.js at 766b95bad6ae2c98c5bf1c4c775c7c9e8f72f2d2 · mrdoob/three.js · GitHub
There is no
threshold parameter for meshes. If you check the documentation page of
Raycaster closely, you will see that it is only possible to define a threshold for point clouds and lines. The configuration object for meshes is actually empty.
Although empty, the mesh configuration object was added just for the case a configuration parameter might be required in the future.