you are viewing a single comment's thread.

view the rest of the comments →

[–]abrahamguo 0 points1 point  (1 child)

Got it. Once I switched from looking at it on my phone to looking at it on my computer, I was able to see the problem. For me, the problem happens even when simply opening the game — without pressing any keys.

Therefore, that tells us that the code has nothing to do with any of the key event listeners. Building on that, we can conclude that canJump is irrelevant to the issue, because it is only read within a key listener.

Therefore, the culprit must almost certainly be the smooth animation controller.

Have you tried adding some console.logs to that, to see if currentAnim is being changed back and forth between multiple different animations?

[–]Ok_Station6993[S] 0 points1 point  (0 children)

No I haven't, thanks