Can't think of a way to do this...
I am trying to forego the input manager as much as I can, and I have gotten mapping the buttons down easy. What I'm having trouble with are the axis on joysticks. Right now I have setup the input manager with "axis 0", "axis 1", "axis 2", etc. and it does map. The problem is the way that I'm checking it, since you can't check it like a GetKeyDown kind of thing, my mapping loop keeps running and all the controls map to the same axis. The best thing to do would be to check my axis array and not map it if the new map matches an existing one. How do I do that?
Here's the code I'm using for the mapping. I'm only going up to six axes for now since I know how my own gamepad for testing is laid out.
for (int i = 0; i < 5; i++) {
if (Input.GetAxisRaw ("axis " + i) > 0) {
axisCodes [setAction] = "axis " + i;
setAction++;
}
}
}
Comment