Hi, my team is using a Logitech attack 3, The plan is to use the dial on the bottom middle to control the speed of the drive. the drive works on its own, we just want more control.
This is what comes to my mind… it’s basically multiplying the first two axis with the input of the third one. Please note the index values will change for your joystick’s axis.
Here’s a variation of Oscar’s idea.
This limits the power to between 50 and 100 %.
It reverses the throttle to make up=full speed and down=half speed.
And it doesn’t have the reverse problem and doesn’t allow the power to drop to zero.
You might want to think carefully about this. This type of throttle does not return to 0 if you let go of it. Also, a slider like this is harder to control than direct thumb control on a stick. Is your driver going to have one hand dedicated to doing only throttle?
When you let go of a control stick, it comes back to the middle, because it is spring loaded. This sliding throttle does not come back to the middle, therefore, when you let go it does not stop.
To be able to vary the range (e.g., 20-100%) uses a different equation to remap (-1 to 1) into (.2 to 1.0) and is probably easiest to implement with a Formula Node from the Programming->Structures palette.
X= the throttle value
y = the range you want (e.g., 20-100% is an 80% range, so y =.80)
Then (x+1)/2*y+(1-y) produces the range .2 to 1.0 from the throttle axis.
I’ll let you work out what this equation does.
The typical solution to this problem is to square (while keeping the sign / positive or negative) or cube the joystick input. This tends to feel more natural or easy to control. But if this third-axis throttle control works for you, then by all means go for it.