you can either use the input manager edit - project settings - input there you can define “axis” like the “jump” in your example. it allows for advanced features and can map several key to the same axis.
if you are sure you will always have the same inputkeys you can also use keycode: Unity - Scripting API: KeyCode
this way you can query all keys and have complicated setups like you want.
note: i’m not sure how your approach conflicts with the character controller. i think there you also configure the keys for movement but have never worked with it.
and unity does not use java but unity script which is a dialect of java script (which has nothing to do with java).
To rotate my character, but the problem is that I have to repeatedly tap the “A” key for it to work. Is there a way for it to work fluidly when I just hold the “A” key down?
//Move left
if(Input.GetKeyDown(KeyCode.A))
{
var left = transform.TransformDirection(Vector3.left);
var strafeLeft = speed * Input.GetAxis (“Horizontal”);
controller.SimpleMove(left * strafeLeft);
}
But I only move left 1 tiny pixel each time I press the button…
define a speed variable and set it to higher value.
also let you output the values getkey returns (for testing). the mousewheel can return 0.1 for example.
and you should multiply the value also with time.deltatime to be frame rate independant.