Page 1 of 1

need help writing mouse x&y axis to FP/vjoy code

Posted: Wed Aug 05, 2015 12:17 pm
by silver237
I needed someone to write a free PIE code to transpose the mouse X & Y axis movement to the vjoy X&Y analog axis.

I will need the following functions added:

-Separate adjustable mouse sensitivity for both axis

-adjustable deadzone

-autocentering once the mouse stops moving

(I'm running win7)
I do not need the mouse buttons...only mouse movement coded. If this work takes some time...I am willing to pay for services if need be.

Thanks in advance,
Chris

Re: need help writing mouse x&y axis to FP/vjoy code

Posted: Mon Aug 17, 2015 6:52 am
by CyberVillain
We only have delta mouse movement so you need to convert this to aboslute cordinates. Then you need to have some logic that detects that the mouse stoped movign for a ceratin period for example doing filters.stopWatch(mouse.deltaX == 0 and mouse.deltaX == 0, 500)

Re: need help writing mouse x&y axis to FP/vjoy code

Posted: Tue Aug 18, 2015 1:49 pm
by silver237
thanks for the response, but i have NO idea how to code.... also I dont know what Delta mouse movement means exactly. I'm assuming your response is refering to the autocentering part of what i needed, since all the other functions I've listed are seen working in other codes.

Is this something you would be able to code/write for me? ...or know who could?

...like I said, I CAN pay for services, I have NO problem w that. Im sure what your talking about would take time.

Re: need help writing mouse x&y axis to FP/vjoy code

Posted: Tue Aug 18, 2015 4:01 pm
by CyberVillain
Heres a start

Code: Select all

if starting:
	x = 0
	y = 0
	ratioX = 100
	ratioY = 100
	recenterTimeout = 500
		
	
	
x = x + mouse.deltaX * ratioX
y = y + mouse.deltaY * ratioY

vJoy[0].x = x
vJoy[0].y = y

if filters.stopWatch(mouse.deltaX == 0 and mouse.deltaX == 0, recenterTimeout):
	x = 0
	y = 0

Re: need help writing mouse x&y axis to FP/vjoy code

Posted: Thu Aug 20, 2015 7:42 am
by silver237
!! I dont have words for this... you made my weekend !! Thank you!!

Now I did try changing the values of the ratio & recenterTimeout...that works well....but, does changing the x = 0 or y = 0 do anything? I tried, but nothing seems to be diffrerent, no matter how slow/fast i move the mouse.

Would you also be able to add an adjustable deadzone line in this code?

Re: need help writing mouse x&y axis to FP/vjoy code

Posted: Thu May 30, 2024 3:17 pm
by IsmaelLighty
Seeking help from professionals is really important, especially when things get tough. For example for me, nursing essay writing became essential because anything related to writing is an incredibly difficult task for me. Their support has been invaluable, making my studies more manageable and less stressful. I'm so grateful for their help, and I highly recommend their services to anyone struggling with writing tasks.

Re: need help writing mouse x&y axis to FP/vjoy code

Posted: Fri May 31, 2024 4:03 am
by David3Lynn
IsmaelLighty wrote: Thu May 30, 2024 3:17 pm Seeking help from professionals is really important, especially when things get tough. For example for me, nursing essay writing became essential because anything related to writing is an incredibly difficult task for me. Their support has been invaluable, making my studies more manageable and less stressful. I'm so grateful for their help, and I highly recommend their services to anyone struggling with writing tasks.
Thanks for advice