08-18-2004, 11:42 PM
So I'm working on something in 3D, and need some help with my math...
I'm having a hard time with something, and I think if I get this right it'll work-- essentially I need to find the coords of the point directly under the mouse. Since the camera itself a point on a sphere with a center at its target, whenever I move the mouse around the screen, I should be moving it along the surface of that sphere.
All 3D stuff aside, it's a math question: given the radius of a sphere, the (x, y, z) of the starting point, and the direction and distance of the movement, how do I find the new coordinates?
I'm having a hard time with something, and I think if I get this right it'll work-- essentially I need to find the coords of the point directly under the mouse. Since the camera itself a point on a sphere with a center at its target, whenever I move the mouse around the screen, I should be moving it along the surface of that sphere.
All 3D stuff aside, it's a math question: given the radius of a sphere, the (x, y, z) of the starting point, and the direction and distance of the movement, how do I find the new coordinates?
size=9]"To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public." -- Theodore Roosevelt[/size]