Titus Posted September 4, 2018 Share Posted September 4, 2018 Hello, I have a player spritesheet with 25 frames for a walk animation loop. When I add the animation and play it without any velocity is works fine. When I add velocity to it I can see that the feet of the sprite are visibly shaking. I've tried playing around with the velocity values and there does seem to be less shakiness with lower velocity values but then the feet are just moonwalking on the floor . I'll add my code below. In the game the velocity is mapped to the right arrow but for testing everything is in the create method here: Link to comment Share on other sites More sharing options...
Titus Posted September 4, 2018 Author Share Posted September 4, 2018 create: function() { this.player = this.game.add.sprite(0, 50, 'player'); this.game.physics.arcade.enable(this.player); this.player.body.collideWorldBounds = true; this.player.animations.add('walkright', Phaser.Animation.generateFrameNames('Fire Marshall Main Walk Cycle_', 20, 43,'', 5), 24, true); this.player.animations.play('walkright'); //this.player.body.velocity.x = 150; } Sorry, here's the code. Link to comment Share on other sites More sharing options...
Recommended Posts