Quote:
Originally Posted by virtuald
Also, looking further, your controller adjustment code is wrong. The values returned from the joystick are in the range [-1, 1], so you don't need to divide by 255.
Additionally, you shouldn't have the 'else: pass' at the end of your statement. If you ever hit that condition, then x1 won't be set, and your code will die with an exception. It should be 'else: x1=??', where ?? is the default value (probably 0?).
Looking around CD, you'll see that most people adjust the joystick curve by squaring the inputs instead of a sequence of if statements as you have there.
|
Thanks with your help, we got our buttons to work! When I am using cmath for square root of the getX and getY, I get a...
Code:
TypeError: unorderable types: complex() > float()
Again, I can not thank you enough for your help!