|
The secret is to think of the joystick as a graph, and define what you want the output to be depending on the number. I did this, and now our controls vary with the square. But be forewarned. Doing this can cause very weird and hard to squash bugs. When I first did it I bumped the joystick and the robot attacked a few nearby 55 gallon drums(edit: I forgot to mention now it works). You will end up using four if then statements. (hint one for each quadrant).
__________________
"He said my name is Private Andrew Malone
If you're reading this then I didn't make it home
But for every dream that's shattered another one comes true
This car was once a dream of mine now it belongs to you
And though you may take her and make her your own
You'll always be riding with Private Malone" David Ball, "Private Malone"
|