Quote:
Originally Posted by Oromus
I'd suggest multiplying the axis you want to invert by -1. Example code:
Code:
if (reversing) { //Put whatever code you use to detect if you're reversing here
myMotor.set(joystick.getYAxis() * -1); //Set a motor to the inverse of the Y axis.
}
|
You can also just place a - in front of it.
Code:
if (reversing) { //Put whatever code you use to detect if you're reversing here
myMotor.set(-joystick.getYAxis()); //Set a motor to the inverse of the Y axis.
}