I am using libgdx to make a running game. I am using vertical parallax background. I have successfully implemented parallax background many times. But for this game, I want my Texture region to fit my screen size. I tried several things but the texture region is streched badly.Here is a screenshot.
I used this code:
texture_bg = loadTexture("data/road1.png"); bg = new TextureRegion(texture_bg, 0,0, 600, 600);
that is obvious. Now ..what should I do... so that while making it as a parallax background... it would fit my screen... I am worried only about the width.... as if the width will fit the screen width... it will look like a running road... no matter how long the height is.
I found some solution here https://stackoverflow.com/questions/7551669/libgdx-spritebatch-render-to-texture
but not able to understand.. it seems somewhat complex. Please make it clear if it is the solution or suggest on other possibilties.