Hello
I have problem with this comand :
dbPickScreen ( int iX, int iY, float fDistance )
Suppose the camera is on the y axis for example :
dbPositionCamera ( 1, 0, 100, 0 ) ;
looking at the origin:
dbRotateCamera ( 1, 90, 0, 0 );
Let's consider a point on the xz plane.
I get its screen ccordinates using :
iX = dbMouseX() and iY = dbMouseY()
then fDistance = 100;
I understood that this comand should store in a vector the x,z world coordinates of the point and the y offset from the camera.
Ok, it works.
But if I tilt the camera, mantaining the same position,for example :
dbPositionCamera ( 1, 0, 100, 0 ) ;
dbRotateCamera ( 1, 60, 0, 0 );
It does not work any longer.
I calculate the screen coords of each point on the xz plane as before, and manually its distance from the non parralel screen plane,
What's wrong?
Thanks in advance for your support
Alberto