I'm working on an RTS camera control system, and when the user zooms in, I want it to zoom in on the mouse's position.
Now this has a downside, and that being that when the camera moves, the focus point where the mouse was, has since moved too. Which, in my case, causes the camera to be very hard to control, and the resulting focus is often far from the initial object.
So my solution is to set it up so that when zooming, the mouse is moved to where the world point is now, and so that the next zoom in, goes to that point again, to give the impression that the user is zooming in to where the mouse is, but it in in fact zooming in on a stored position.
I would be using, which was half the battle to find.PHP Code:
Hopefully, what I've found on google is not required anymore. And that is, using a windows only DLL, which would suck for cross platforming.