[Math] Help with matrix mathematica

3dgeometrymatrices

Hi I am wondering how best to explain this, I am working with WebGL (effectively OpenGL) and I have the ray cast from clicking in 3d space. I have the far and near values of the ray cast, the camera position and the target it is looking at.

How do I work out where the ray cast starts and ends, effectively to draw a line to show the ray cast through 3d space. The most confusing part of this for me is the angles, subtracting the angles of the cameras face which are also in radians.

Camera position would obviously be the start point, so I need to use that and using the direction the camera is facing, along with the near and far values of the ray to get the end point! I'm confused, please help.

Best Answer

Solved: I obtained the correct values from else where within the WebGL wrapper.

Related Question