EgorkZe Posted November 24, 2014 Share Posted November 24, 2014 Hi! I added some animations to sprite like this this.animations.add('run', Phaser.Animation.generateFrameNames('bunny_run', 0, 12, '', 4), 25, true); this.animations.add('jump', Phaser.Animation.generateFrameNames('bunny_jump', 0, 12, '', 4), 25, true); this.animations.add('slide', Phaser.Animation.generateFrameNames('bunny_slide', 0, 12, '', 4), 25, true); this.animations.add('death', Phaser.Animation.generateFrameNames('bunny_death', 0, 12, '', 4), 25, true); But the animation's frame for slide higher then other( How can i move the frame of animation? Link to comment Share on other sites More sharing options...
valueerror Posted November 24, 2014 Share Posted November 24, 2014 if i understand you correct the slide animation is shown a few pixels higher than the other animations.. if thats correct you should correct your spritesheet. change the graphics in gimp or photoshop (move those images that are to high down a few pixels - line them up with the others) Link to comment Share on other sites More sharing options...
EgorkZe Posted November 24, 2014 Author Share Posted November 24, 2014 @valueerror i use starling sprite sheet( i haven't possibility to move images( Link to comment Share on other sites More sharing options...
valueerror Posted November 24, 2014 Share Posted November 24, 2014 starling sprite sheet is a sprite atlas right? every atlas is made out of individual images an the resulting json reflects their measurements.. so basically if you have the originals and created the atlas yourself it is possible.. changing the pivot of the player the moment the animation starts and changing it back could also solve your problem but pivot has a bug in the current pixi implementation and isn't working.. Link to comment Share on other sites More sharing options...
lewster32 Posted November 24, 2014 Share Posted November 24, 2014 Valueerror is right, you shouldn't be adjusting for offsets manually, your assets should already have this taken care of. All sprites for a character should really have a common origin - with a character that walks on the ground, I usually ensure the origin is bottom centre. Link to comment Share on other sites More sharing options...
Recommended Posts