Jump to content

How to offset for animation of sprite


EgorkZe
 Share

Recommended Posts

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

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

 Share

  • Recently Browsing   0 members

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