Hi everyone,
I am trying to detect collisions on mousemove but unlike the picking example where the direction of the ray has z = -1, I’m trying to cast a ray on the y or x-axis. I’ve tried setting the origin equal to the mousePosition and direction to (0,1,0) but for some reason, this does not seem to work for me.
I have verified that the objects are on the same z-axis.
I tried to do this without setting the camera but seems like the camera is required otherwise I get an error so I have to use
ray.setFromCamera( mouse, camera );
But if I do use this, the intersections again return the objects which are directly below the mouse.
What I’d like to do is to be able to intersect with objects in the Y axis say 10 units from the mouse Y if that makes sense.
Is this even possible?