Page 1 of 1

mouse.delta discrepancy

Posted: Tue Dec 05, 2017 8:23 am
by DrDim
Hi!.

I made a script or a game (Dark Forces) that translates vertical mouse movement into button presses. Works perfectly fine on my machine:

http://steamcommunity.com/app/32400/dis ... 693466476/

However another player reports that it behaves differently on his PC. We narrowed it down to the mouse.deltaY values. Apparently he only gets values other than 0 when he slowly moves his mouse and even then it's 0 most of the time. This is not an issue on my end.

Any idea what may cause this discrepancy? Maybe different mouse settings?

Here's a simplified version of the script (the advanced version is smoothing the input instead of using "raw" values but essentially it's the same):

Code: Select all

if starting:
	toggleUp = 0
	toggleDown = 0

if mouse.deltaY > 0:
	toggleUp = 1
	toggleDown = 0
	counter = 0
elif mouse.deltaY < 0:
	toggleUp = 0
	toggleDown = 1
	counter = 0
else:
	toggleUp = 0
	toggleDown = 0
	
keyboard.setKey(Key.PageUp, toggleUp)
keyboard.setKey(Key.PageDown, toggleDown)

diagnostics.watch(keyboard.getKeyDown(Key.PageUp))
diagnostics.watch(keyboard.getKeyDown(Key.PageDown))
diagnostics.watch(mouse.deltaY)

Re: mouse.delta discrepancy

Posted: Tue Dec 05, 2017 10:57 am
by FrenchyKiel
Make sure "Enhanced pointer precision" is not ticked