Jump to content

update method - animation restarts when using .onDown


Recommended Posts


Hope someone can help

if I try to do a key press my animation stops until I let go of the key. (keys a and d) to move left and right - is there a way for the key press  .onDown to be used once or an aletrantive way to have my animation play when the key is held down, I've tried using the docs but can't seem to find a solution

eg demo below


code snippet when pressing d

if (this.keyRight.isDown){


this.player.flipX = false;



Thanks in advance


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...