Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   reversing an axis on a joystick (http://www.chiefdelphi.com/forums/showthread.php?t=101482)

Twisted eric 29-01-2012 16:41

reversing an axis on a joystick
 
nevermind

Chiller 29-01-2012 16:48

Re: reversing an axis on a joystick
 
Quote:

Originally Posted by Twisted eric (Post 1115962)
My team is doing mechanum wheels and I don't know how to program them with two joysticks(or even one). and almost got it but for a normaly set.getY(); will set one side going backwards. Please help.

Just invert the values... when you go positive then change it to negative: -set.getY();
For when you go negative do: Math.abs(set.getY());


All times are GMT -5. The time now is 22:20.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi