Hello.
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)
{
HandleInput();
if (lowerVolume) { LowerMusicVolume(); };
}
}
private void HandleInput()
{
if (allowInput)
{
ProcessThrust();
if (!isGrounded) { ProcessRotation(); }
}
if (won) { AwaitInput(); }
}
private void ProcessRotation()
{
//float direction = Input.GetAxisRaw("Horizontal");
float direction = (Input.GetAxisRaw("Horizontal") * PlayerPrefsController.GetCtrlInversion());
if (direction != 0f)
{
Rotate(direction);
if (allowAudio)
{
allowAudio = false;
StartCoroutine(PlayTurnAudio());
}
if (direction < 0f)
{
lt = true;
SetTurnAnimation(left:true);
SetSideThrusterVFX(left: true);
if (rt) { SetSideThrusterVFX(right: false); rt = false; }
}
else if (direction > 0f)
{
rt = true;
SetTurnAnimation(right:true);
SetSideThrusterVFX(right: true);
if (lt) { SetSideThrusterVFX(left: false); lt = false; }
}
}
else
{
SetTurnAnimation();
SetSideThrusterVFX();
lt = false; rt = false;
leftThrusterLight.enabled = false;
rightThrusterLight.enabled = false;
}
}