Jump to content

Sprites not changing with gamepad


Bancat
 Share

Recommended Posts

I recently implemented gamepad support on my game using Phaser and it works great, but my animations aren't working anymore. When my game was only keyboard and mouse they animations worked perfectly, I simply implemented player.animations.play into my gamepad code but it doesn't work anymore, while it does change frame it sticks to only 1 frame instead of alternating between them.

Gamepad.png

Link to comment
Share on other sites

Quick fix: comment out "player.animations.stop()" in the keyboard input. You are stopping the animation every frame.

I would suggest restructuring your input code to avoid this issue, since you will eventually want to support keyboard and gamepad together.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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