Line raycast bug

raycast a big length arrowHelper, intersection always null

like this:

let helper = new ArrowHelper()

raycaster.params.Line.threshold = 5;

ArrowHelper set line.scale:

In function Line.raycast, localThreshold will be very small.

Please ask if the ArrowHelper is only suitable for display, not for raycast

I am not sure I understand the question. Anyway, I will try to answer it:

ArrowHelper is used just to quickly draw a vector as an arrow. That’s all.

Raycaster also uses a vector for the direction of the ray casting, and you might be temped to use the ArrowHelper.line property. Do not use it. The raycaster requires the direction to be normalized (i.e. its length is 1), while ArrowHelper.line is not normalized (its length is the length of the arrow without the head).

1 Like