Please always use the camera for raycasting you are actually rendering the scene with.
Besides, if you are not using a fullscreen canvas, you might have to adjust the computation of your mouse coordiantes, see Custom canvas size with orbitcontrols and raycaster - #2 by Mugen87.
Apart from that, I’m afraid I do not fully understand your issue. Are raycasting against a point cloud or mesh? Besides, the intersection point (intersects[0].point
) is always in world space. Object3D.position
which is defined in local space. Depending on whether the 3D object has a parent or not, you can’t compare both values.