I have a bool in my settings menu that is called inverted controls. This is because the arrow keys and WASD are both used for different things and some people might want to swap their functions in the game.
How can I change an input axis buttons from code and if that’s not possible what is another way I could do it?
here is a simplified version of the code:
I want this to be (left arrow) and (right arrow) if the inverted controls bool is true
if (Input.getaxis("Horizontal"))
{
//move the player
}
I want this to be (a) if the inverted controls bool is true
if (Input.GetKey(KeyCode.LeftArrow))
{
//move the camera left
}
I want this to be (d) if the inverted controls bool is true
if (Input.GetKey(KeyCode.RightArrow))
{
//move the camera right
}