Changing The Controls
The mouse sensitivity variable controls how fast the camera moves, change it to suit your preference.
This is all you need for a basic character controller, but, as is good practice, you should change the input keys.
Go to Project > Project Settings… > Input Map and in Add New Action
add ‘forward’, ‘left’, ‘backward’, ‘right’, and ‘jump’.
Press the plus button next to each one and press the key you would like them to be.
It is recommended ‘forward’ should be W, ‘left’ should be A, ‘backward’ should be S, ‘right’ should be D, and ‘jump’ should be spacebar.
In your script, replace ‘ui_up’ with ‘forward’, ‘ui_left’ with ‘left’, ‘ui_down’ with ‘backward’, ‘ui_right’ with ‘right’, and ‘ui_accept’ with ‘jump’.
‘ui_cancel’ does not need to be changed, since it would be the key you press to exit anyway.