Three.js Raycaster.intersectobject Do Not Intersect When Three.points Has Only 1 Vertex Or Has Vertexs Arranged In Line
I spent several hours to understand this problem. For some inexplicable reason (for me) raycaster.intersectObject( pointCloud ); do not intersect my 'pointCloud' Object when it ha
Solution 1:
@WestLangley gave me the answer in GitHub.
He said: "Your bounding box has no volume. Try this and report back:
pointCloud.geometry.boundingBox = null;
"
I tried and it worked out of the box!. And the detection is working even better than before.
Something that @Beiller pointed out in the comments, and is important to include here I think.
I had a call to
this.geometry.computeBoundingBox();
...for my geometry, but the points are not volumes, so single point or aligned (in one of the three axis: x, y or z) points are not detected. Using instead:
this.geometry.computeBoundingSphere()
solve the problem too.
Post a Comment for "Three.js Raycaster.intersectobject Do Not Intersect When Three.points Has Only 1 Vertex Or Has Vertexs Arranged In Line"