[SDL] MouseMotion

Started by
1 comment, last by VitaliBR 13 years, 9 months ago
Hi!


I searched a lot about, but found nothing detailed about the function SDL_MOUSEMOTION.

I know he provides four values, they being the mouse position absolute (x and y) and x and y relative.
But do not get it until now, it is this value 'relative' of X and Y?

Neither the SDL documentation explains

Thanks
http://mateusvitali.wordpress.com/
Advertisement
The relative value is relative to the cursors last position. So if the user moved his cursor 10 pixels to the right, the relative X value of the event would be 10. If he moved the cursor 15 pixels to the left, and 26 pixels down the relative X would be -15 and the relative Y would be 26.

Hope this helps :)
"Buy heaps of coffee, Coffee is a boon to all programmers." - elegantmoron
Thanks! I understand.

I'm trying to use this function to move(w/ mouse) my camera with OpenGL.
If anyone know any tutorial or example of how to do this thanks.
http://mateusvitali.wordpress.com/

This topic is closed to new replies.

Advertisement