I made a game using Libgdx where the character is being followed by the cameras, but the problem is that when my character moves the camera shakes.
velocity.add(0, gravity); velocity.scl(deltaTime); position.add(velocity.x, velocity.y); velocity.scl(1 / deltaTime); my character moves upward because the gravity is 9.8 and when the player touches the screen I set the velocity.x = 100 and velocity.y = -120to make it go downward and forward, that' s when the camera starts to shake.
camera.translate(100 * deltaTime, 0); I played with the values of camera shake but its either too fast or too slow and there's always a shake. What I wanted is a smooth camera with a delay effect when my character start to move.