I've a condition in my game where, I want my camera to follow the Player(its a body from Box2d) and in some not.
This is the start screen of my game:
Now, when i press a button(space) the player get an LinearVelocity in x,y direction and starts flying..
As soon as it reaches the end. The box is now out of the camera.
To fix this I made my camera centered the box.
This is where I screwed. I dont want my ground to come in the center it should always needs to be at bottom.. like in Picture 1 and the player should also needs to be at the left-bottom at the start of the game. And when player flies away ... the x and y coordinates should be moved as my player moves ... i have certain height where player can fly so camera should be able to move in y-axis also.. and the game is endless running game so x- cordinates also keeps comming in.