Jump to content

Phaser jumping animation


dudeperfect
 Share

Recommended Posts

I have an animation, where crocodile moves his mouth up, so the frame images height is constantly changing. What I get - jumping animation(whole head moves down). I would like to ask, what can I do to avoid it? Is it a problem in my code(do I need set some settings), is my sprite sheet packer is doing wrong? Or I made mistake in my Photoshop where I created the sprites?

 buildCrocodile: function() {        this.crocodile = this.add.sprite(0, 0, 'croco', 'Crocodile01');        this.crocodile.anchor.set(0.5, 0.5);        this.crocodile.animations.add('Eat');        this.crocodile.animations.play('Eat', 4, true);        this.physics.enable(this.crocodile);        this.crocodile.body.collideWorldBounds = true;    },

post-12346-0-77716600-1420241385_thumb.p

croco.xml

 

Who spots something odd, please tell me. 

 

Thank you.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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