Doug Posted March 27, 2018 Share Posted March 27, 2018 Hi all I've got an animation of a running ninja (original hey). Sprite sheets attached. I am doing the following in my code: Preload function: this.load.atlas('sprites', this.p('Sprites.png'), this.p('Sprites.json')); Create function: this.ninja = this.physics.add.sprite(this.gameWidth/2, this.gameHeight/2, 'sprites', 'stand').setCollideWorldBounds(true); let runConfig = { key: 'run', frames: this.anims.generateFrameNames('sprites', { prefix: 'run', start: 1, end: 7, zeroPad: 0 }), repeat: -1, frameRate: 5 } this.anims.create(runConfig); this.ninja.play('run'); I am using texturepacker (https://www.codeandweb.com/texturepacker) to create the sprite sheet as a Phaser3 spritesheet. I have set the pivot points for each frame to be on the ninja's chin so that the head is always still when he is running. When I run the game the character jolts left and right as if it is ignoring the pivot points that I've set in texture packer. Is this a bug or am I missing something obvious please? Thanks so much! Sprites.json Link to comment Share on other sites More sharing options...
Doug Posted March 28, 2018 Author Share Posted March 28, 2018 Update: Andreas at Code And Web pointed me to this: https://github.com/photonstorm/phaser/issues/3288#issuecomment-369294565 Link to comment Share on other sites More sharing options...
Recommended Posts