In Play class I have the viewport of game height=320 and game width=240unitswith camera cam. I have set the camera(cam) viewport width to 10 and viewport height to 7.I have another camera hud whose viewport width is game width and viewport height is game height. In render method, I have set Spritebatch to a projection matrix of hud.combined.Here is how the game looks like
I want the camera to follow the player. I have tried this
cam.position.set(player.getPosition().x,player.getPosition().y,0);
After doing this, the tilemap is bouncing and i can see the black portion of the screen