Delta wheel is always 0.0F

Hello again,

I think I'll have to start reading other people's posts in my spare time and answer some questions to repay back all the questions I ask myself :slight_smile: Until that magical moment when I actually have spare time, here's another one.



I bind game control to the MouseAxisBinding - AXIS_W, and that keeps returning 0.0F on each update cycle, no matter if I scroll the wheel or not. By inspecting the problem, I dug down through MouseInput to the org.lwjgl.input.Mouse class, whose getDWheel() constantly returns 0.0F.



By inspecting LWJGL's code org.lwjgl.input.Mouse class, it looks like static dwheel member is reset to 0.0F every time you call getDWheel method (line 566, please correct me if I'm wrong), which seems a bit odd behavior, but after rechecking com.jme.input.lwjgl.LWJGLMouseInput code, values are stored during update cycle.



Mouse is not grabbed by application, instead we use hardware cursors. My system is Ubuntu 8.10, but behavior is same on the colleague's XP machine.



Any ideas? If this is LWJGL question, just notify me and I'll re-post this on LWJGL forums.

I would recommend posting a test showing what the problem is and what the expected result should be :wink:

Hi,

sorry for not providing test in the first place. I tried to do so now, but I was unable to reproduce the problem. I reproduced whole environment: BUI, Render passes and some custom rendering behavior, but test clearly shows delta values. Test writing alone did help me fix the problem though:



I figured out that BUI still receives event in original app code, and then went on investigating and realized some genius made main game GUI not as separate windows, but as a great fullscreen transparent window with arranged panels, with logic to propagate events on in case you click on transparent area. That was stealing events.



In any case, you helped :slight_smile: Tnx.





P.S. I'll try not to ask questions anymore without providing test code first :wink:

no worries dues_ex_machina :slight_smile:



Don't worry about making a test for every problem, its okay to post first, some problems will have a quick answer :wink: