So I've got a really mysterious problem. I want to animate my character walking across the ground. So whenever I call player.moveRight()
or player.moveLeft()
in gameScene's update()
, it only plays one of the frames when I hold down the move button. When I release the move button only then does it plays the rest of the frames. What could be going on??
EDIT:
Hey guys I found the solution! So you guys were right, it was because update() was calling the animation function more than once. I set up some Boolean checks and it works now. I also came across this that really helped me out.
Calling method with animation from update function in sprite kit
Hey guys I found the solution! So you guys were right, it was because update() was calling the animation function more than once. I set up some Boolean checks and it works now. I also came across this that really helped me out.