0

I want to make an animation of player when he 's running. I put all images into a .pack file using texture packer. And here's my code:

TextureAtlas atlas = new TextureAtlas(Gdx.files.internal("images1/images.pack"));
private Array<AtlasRegion> textureRegion1 = new Array<AtlasRegion>();
textureRegion1 = atlas.findRegions("rps_man");
animation[0] = new Animation(1/4f, textureRegion1);
TextureRegion currentFrame = animation[0].getKeyFrame(stateTime, true);

The problem is: my animation run well but it's not smooth. it had "deltils" around the player. Any helps will be appreciated. Thank for reading!

P/s: I had opened .pack file by Notepad and changed filter: Nearest,Nearest to filter: Linear,Linear but nothing happened.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • 1
    Whats "deltis"? Also your animation seems to be 1 frame only. Could you post an image, gif or video of your problem? – Daahrien Oct 09 '14 at 09:37
  • Thank for your attention. "deltis" - I think that the picture is not smooth. I have solve my problem. Libgdx works well. The problem is in photoshop. I tried to cut 1 picture to 4 another pictures in the same size and that 4 pictures are not smooth. Hope everybody dont have the same mistakes as me. Thank you>:D – Sói Gian Ác Oct 15 '14 at 04:10

0 Answers0