BrandonMakin/Gyro

Button Input Desync

Closed this issue · 1 comments

First noticed this when testing on local server:

Occasionally, the acceleration button doesn't act like it was "unpressed". I threw in some print statements, and the problem is that on entering a DraftBox, it sometimes causes signals to trigger twice, the first time being 'on' followed by 'off' like it's supposed to, but the second time it flips and is 'off' followed by 'on', so even though the button isn't pressed, the fish accelerates.

I seem to be able to trigger a similar glitch with the drift button, where the fish is permanently trapped in a drift. However, that bug's more severe, as if the fish is never drifted back, then the camera portrays the fish as locked in a drift... forever. Movement seems to function the same, and future drifts run perfectly... but since the camera's PI/5 off, it makes everything appear wack. (Potentially swapping the rotate pi/5 to a keyframe animation could fix this one with a tap of the button, but I'm not sure)

My best guess would be that it's related to some engine lag or something throwing off your button input code, but I really don't know.

This problem is amplified when the game is played on the remote server instead of the local one, leading me to believe that it may be lag related.

I did apply a quick and dirty fix to allow players 'trapped in drift' to fix their model by hitting another drift, but it doesn't fix the underlying problem.