Search the Community
Showing results for tags 'trimming'.
-
Hello, I'm having some trouble animating a sprite atlas. I apologize if this is something I'm doing wrong in TexturePacker but I can't seem to get it to animate right in Phaser. I loaded the atlas using game.load.atlasJSONHash() and it IS flipping through all the frames. The problem, however, is that the textures seem to re-center on the sprite based on the width of the particular frame. The running animation for my sprite worked perfectly because the width and height of each frame stayed the same, but when my sprite extends his sword out from his body and expands his size, his texture is re-centered. This causes his whole body to appear to shift over slightly. It almost seems as if I need to adjust the anchor point for the sprite at each frame. I hope that explanation makes sense. Here are some pictures of my spritesheets. It is worth noting that the slash animation works as intended if I don't perform the trimming and I leave all the frames the same size. TRIMMED: NOT TRIMMED: Any help would be greatly appreciated. Really enjoying Phaser thus far!