It looks like there’s not a lot of traffic on this board, but maybe someone can help me out. I’m just trying to find out the best way to read the mouse position. I’m building an OpenGL engine, and want to implement a standard mouse-driven camera. I think that I need to get the mouse position relative to the position the previous frame, but I’m not sure how to do this. Using the standard toolbox mouse routines gives you a coordinate in screen space, which means that once you’ve gone so far to the left, for example, you can’t go any farther. Obviously that isn’t what you want for mouse-driven movement.
I’m sure there’s a standard way of doing this. Anyone know what it is? Thanks.
I’ve noticed too that there aren’t many visitors in this forum. There is, however, a LOT of traffic on the Apple OpenGL mailing list and newsgroups. Check it out: http://lists.apple.com/
[This message has been edited by Decimal Dave (edited 08-10-2001).]
I don’t think knowing the position of the mouse in relation to the center of the screen is enough. You only want movement when the mouse position has changed, so you need to know the position of the mouse relative to its previous position. Normally, when the mouse reaches the edge of the screen, it has reached x or y = screenMin or screenMax, and can’t move any farther. This would mean that you could only move so far, but then you would have to move back the other way.
It seems that you need a way to set the mouse coordinates as well as read them, so you can snap the mouse coords back to the center of the screen after every read. But I don’t know how to do that