Horizontal input / GetAxisRaw not working in WebGL build

I’ve finished my Project Boost from the 3D programing course & I’m trying to upload it to the web, but when it’s uploaded & I test it the Left/Right input is not registering & my rocket can do nothing but fly straight up.
This happens on both ShareMyGame & Itch.io.
Everything else works as it should so I wonder if there is any problem with the fact that I’ve used Input.GetAxisRaw(“Horizontal”); for my steering input or have I missed anything else?

Everything works in a standalone pc build & in editor.

My Code (if it’s relevant):
void Update()
if (pauseMenu != null) { CheckPause(); }
if (!gameIsPaused)
if (lowerVolume) { LowerMusicVolume(); };

 private void HandleInput()
    if (allowInput)
        if (!isGrounded) { ProcessRotation(); }
    if (won) { AwaitInput(); }

private void ProcessRotation()
    //float direction = Input.GetAxisRaw("Horizontal");
    float direction = (Input.GetAxisRaw("Horizontal") * PlayerPrefsController.GetCtrlInversion());
    if (direction != 0f)
        if (allowAudio) 
            allowAudio = false;
        if (direction < 0f) 
            lt = true;
            SetSideThrusterVFX(left: true);
            if (rt) { SetSideThrusterVFX(right: false); rt = false; }

        else if (direction > 0f) 
            rt = true;
            SetSideThrusterVFX(right: true);
            if (lt) { SetSideThrusterVFX(left: false); lt = false; }
        lt = false; rt = false;
        leftThrusterLight.enabled = false;
        rightThrusterLight.enabled = false;

Hi there, are you using the keyboard to play or are you trying to use a gamepad?

The game supports both keyboard & gamepad.
After a while I determined that the stering does work but sometimes it just refuses, no clue why.
And if it does refuse, if I open my options menu and manipulate the volume sliders left & right the steering starts working again… ¯_(ツ)_/¯

But I decided that is good enough for this project.

Privacy & Terms