Mouse DX/DY alternates between high and low values

Started by steamednotfried, July 20, 2012, 11:03:35

Previous topic - Next topic

steamednotfried

Upon implementing a first person camera, I noticed some jitteryness when using the mouse for turning/looking. I tried printing out the mouse's DX in each frame and noticed something odd. When the mouse was moving at an approximately steady speed in real life, what was reported in the printout was something like this:

219, 160, 252, 171, 273, 177, 267, 167 and so on.

These are the successive DX's in each frame. Notice how they alternate between high and low values. This general pattern happens every time I run the program and at all times within each run. I have checked that the same time elapses between the successive DX's. The same thing happens with different mice. But all of the mice work fine while playing other fps games on the same computer. Is this a bug in LWJGL or is there something else that I'm missing?

Thanks.

Edit: I should add that the same thing happens with the DY's.

CaleyM

Out of curiosity I tried commenting out Display.sync() and the feed looked like that.

steamednotfried

Quote from: CaleyM on July 20, 2012, 12:04:30
Out of curiosity I tried commenting out Display.sync() and the feed looked like that.

Thanks, but I haven't commented it out and my feed looks like that.

princec

This may be related to an ongoing discussion about issues with getDX/DY on Windows which causes it to be unreliably jittery. See here.

Cas :)