Sprite animation

Hi,

I used sprite sheets in my game to store all my sprites, each sprite was the same size, not I’ve got more sprites and they range in sizes, what is the best way to animate these? Can I use texture packer for this and get the size information from the atlas text file or possibly the texture once you got it or something?

Something like:


        TextureAtlas textureAtlas = new TextureAtlas(Gdx.files.internal("sprite.atlas"));
        texture = textureAtlas.findRegion("0001").getTexture();
        Gdx.app.log(TAG, "Texture width: " + texture.getWidth());
        Gdx.app.log(TAG, "Texture height: " + texture.getHeight());

I suspect the above though would give the size of the whole sprite sheet?

As the sprites will be different sizes, I would need this for the collision detection too.

Thanks for any advice.