I know the position of two points (say A and B), and an imaginary line go through these two points.
I would like to know the X and Z coordinates of the point on this line with an Y of 0 (i.e. the intersection between this line and the plane of equation Y = 0)
The goal of this calculation is to make a map editor for my "game", more specificaly to put objects on the plane map, getting these points A and B thanks to the function :
Code: Select all
line3d<f32> line = hotp->scene->getSceneCollisionManager()->getRayFromScreenCoordinates(pos, camera);
If someone good in maths may help me with this calculation... I would really appreciate any help (as usual )
Thank you all, have a nice day !