Is there a way to determine if a vector's new position intersects with a specific line?
I have the coordinates of the original vector and its new position. The line in question is always perpendicular to the direction of the vector's original position and is consistently located at the same distance from zero.
Using threejs, I have access to all their math and vector functions, but this scenario is limited to 2D.
Below are two images to clarify the situation. I am trying to ascertain if the black dot crosses the red line. https://i.sstatic.net/6ZgFP.png
https://i.sstatic.net/eb8pM.png
UPDATE
In case anyone needs to refer to the code for this, credit to @beta's solution below. The aim was to prevent a point from moving too close to the center of another object.
canPointMoveTo(originalPos, newPos) {
const minDistance = 40;
const k = originalPos.clone().normalize();
const newDotProduct = newPos.dot(k);
return newDotProduct >= minDistance;
}