dzabb Posted June 6, 2014 Share Posted June 6, 2014 is there a possibility to have more than one texture atlas in sprite? character in my game has so many animations which won't fit in one texture file. Link to comment Share on other sites More sharing options...
lewster32 Posted June 7, 2014 Share Posted June 7, 2014 You can only define animations on a sprite from a single atlas/sprite sheet currently. I believe this isn't just an arbitrary issue, but a matter of performance - specifically in the case of WebGL where texture atlases are very fast because you're not changing the texture, just the position. As soon as you start replacing textures you incur large performance penalties. You can try the following: reduce the amount of frames or the size of the character, make sure your atlas is packed efficiently (you may want to try reducing the padding for instance) and if you can get away with it (and if it's applicable) only have the character facing in one direction, and change the sprite's scale.x to -1 to 'flip' it when facing in the other direction. Link to comment Share on other sites More sharing options...
Recommended Posts