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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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