frankdev Posted June 28, 2014 Share Posted June 28, 2014 Hello All, Sorry if this is a duplicate post; I thought this would be a fairly popular topic but I have yet to find my answer. I was wondering if it is possible to easily change the frame width of a spritesheet. When I preload the spritesheet:this.game.load.spritesheet(ResKeys.playerSprite, 'assets/playersprites.png', 30, 30);I pass in 30 as the width. For one of my animations, however, I want the width to be 60. Thanks! Link to comment Share on other sites More sharing options...
lewster32 Posted June 28, 2014 Share Posted June 28, 2014 Do you mean one frame is a different width to the others? If so, no, this isn't how sprite sheets work - they need uniformly sized frames. If you need non-uniformly sized frames you need instead to use a texture atlas using something like TexturePacker or search Google for one of the many free online texture atlas tools. Link to comment Share on other sites More sharing options...
frankdev Posted June 28, 2014 Author Share Posted June 28, 2014 Yeah that is what I meant. Thanks for the tip. I will look into texture atlases! Link to comment Share on other sites More sharing options...
Recommended Posts