Raycaster can't pick up certain points in a pointCloud

There are about 20,000 points in my scene. When they are in other shapes, I can reach every point. However, when using the bar chart shape, I can’t reach the red points on the far end of the x-axis, (the points above 62) which means, the raycaster doesn’t work at all.

It seems any points outside of the grid area can’t be picked up. I tried to shrink my points but even though I manage to put every point inside the grid area, the points on the far end of the x-axis are still not castable.


I added an OrbitControl and dragged the red circles closer to my camera view and the raycaster works. So how to make sure all the points can be picked?

Is there any chance to provide a live code example, reproducing the problem?

Thank you so much for your reply! I find the solution while I was creating a live code example (So sorry that it took me too much time so I gave up). However, I solved the problem simply by adding this line geometry.boundingSphere.radius +=200;.

Before I added that line, I only used _geometry.computeBoundingSphere();. I think you cannot use raycasting on points that are outside of the boundingSphere. I haven’t noticed anything weird with manually changing the boundingSphere radius.

The solution is interesting… and enigmatic at the same time :slight_smile:
And still it would be great to provide a live code example as I’m curious of how it works in that way :thinking:

1 Like