I want to render one sprite on top of another one. I create both sprites using same coordinates and while debuging I can see that they have same position but still one is being rendered beneath another and slightly to the left. Could somebody tell me what am I doing wrong? here is my code where I create sprites:
Sprite sprite1 = new Sprite(new Texture("1.png")); sprite1.setScale(1/PPM); Sprite sprite2 = new Sprite(new TextureRegion(...)); sprite2.setScale(1/PPM); sprite1.setPosition(x,y); sprite2.setPosition(x,y);
Could it have something to do with scaling? Or maybe the fact that second sprite is created from TextureRegion?