SSStand Posted December 6, 2013 Share Posted December 6, 2013 I have a sprite sheet , which one has a sequenced animation with different size , and i have set the anchor point to .5,.5when i create the sprite , however since there are frames with differentsize , the default anchor point do not belongs to the center position.how do you treat about this issue ? any advice are welcome. Thanks in advance. some code for instance: this.wb = g.add.sprite(w, h, "wb"); this.wb.anchor.setTo(.5, .7); // TODO this.wb.body.collideWorldBounds = true; this.wb.body.bounce.setTo(0, 0); this.wb.animations.add( 'stay' , framesNamesGene(symWindBladeSpr, 0, 10, "", 4), 16 , true); this.wb.animations.add( 'move', framesNamesGene(symWindBladeSpr, 11, 14, "", 4), 25, true ); this.wb.animations.add('wind_slash', framesNamesGene(symWindBladeSpr, 15, 35, "", 4), 10 , true); this.wb.animations.add('wind_blade', framesNamesGene(symWindBladeSpr, 36, 44, "", 4), 24 , true ); g.camera.follow(this.wb); this.wb.animations.play("wind_slash"); Link to comment Share on other sites More sharing options...
Kratos_SA Posted June 15, 2016 Share Posted June 15, 2016 Did you resolve this? Link to comment Share on other sites More sharing options...
Recommended Posts