So the game that I am working on is basically just a car moving forward indefinitely and dodging obstacles. This is my current code, the car does automatically move forward without any inputs but is there anyway I can modify my current code to disable my ‘s’ or down arrow key?
horizontalInput = Input.GetAxis("Horizontal");
forwardInput = Mathf.Min(Input.GetAxis("Vertical") * 2 + 1 , 1);
// Move the vehicle forward
transform.Translate(Vector3.forward * Time.deltaTime * speed * forwardInput);
transform.Rotate(Vector3.up, Time.deltaTime * turnSpeed * horizontalInput);