Issue:
Sometimes when using semi-automatic weapons, when pressing M1 instead of holding, your inputs will appear to be missed causing the shot to not fire.
Potential Cause:
Fire input is handled via event/signal rather than in update loop.
Potential fix:
Move this specific input handling into an update loop and add a "tryFire" method while fire input is held.
Commentary:
From my personal dev experience, this is typically a user "feeling" issue rather than a technical issue. When the M1 input is detected during your input handling, you check if currentTime - lastTimeFired >= fireRate and shoot accordingly. Logically makes sense, but feels bad to the user because if they hit M1 1 tick early the gun will not fire.
Of course there could be the issue where sounds/animations are handled differently for when the user is holding the mouse vs a press event/signal which would indicate a larger issue within the input handling logic.
Sometimes when using semi-automatic weapons, when pressing M1 instead of holding, your inputs will appear to be missed causing the shot to not fire.
Potential Cause:
Fire input is handled via event/signal rather than in update loop.
Potential fix:
Move this specific input handling into an update loop and add a "tryFire" method while fire input is held.
Commentary:
From my personal dev experience, this is typically a user "feeling" issue rather than a technical issue. When the M1 input is detected during your input handling, you check if currentTime - lastTimeFired >= fireRate and shoot accordingly. Logically makes sense, but feels bad to the user because if they hit M1 1 tick early the gun will not fire.
Of course there could be the issue where sounds/animations are handled differently for when the user is holding the mouse vs a press event/signal which would indicate a larger issue within the input handling logic.