Closed nift4 closed 5 years ago
'rel' in the MOUSEMOTION event is the relative movement from previous mouse move/down event. So if the previous event occurred at (10,10) and a move to (4, 18) occurred next, the call to get_rel would be (-6, 8) in pygame. If no movement occurred since the last message, the next call to get_rel would (or should return (0,0).
My new sample code in Issue #1 (https://github.com/pigamedrv/pigame/issues/1) includes what should be the proper rel data in the event (still testing :))
https://www.pygame.org/docs/ref/mouse.html#pygame.mouse.get_rel
Can I do rel = (newx - oldx,newy - oldy)
? I think so but I'm not sure.
Basically, yes, that's all it is. It just makes it easier to tell if the last motion occurred on one of the same planes or at an angle to the previous motion.
Fixed in c3abd01
MoreFNC fixed in 1961800
I don't know what rel is doing (and Google also don't really know) and its set to (0,0) in pigame. Any help or pull request whould be nice :)