I am attempting to cast a ray directly towards the left and right from a central point.
The central vector I am using is the origin. In Three.js, the raycaster requires a direction as a parameter.
var origin = new THREE.Vector3();
var direction = new THREE.Vector3();
var near = 0;
var far = 100;
var raycaster = new THREE.Raycaster(origin,direction,near,far);
As far as I know, to get the direction to the left from the origin would require a perpendicular vector from the origin. I am not sure how to achieve this in Three.js I am also struggling to determine camera rotation so that it always faces the direction of the 2 vectors.
My ultimate goal is to achieve the following result:
https://i.sstatic.net/cyqgy.png
Starting from the point on the right (origin) - I aim to cast a ray to the highlighted point on the left.