Hi there -
I am noticing that my camera (per the 2D Unity tutorial) follows the little delivery driver car just fine - but the background seems to jerk a bit whenever I first press left or right. If I hold left or right down, it’s smooth - likewise if I don’t press it at all. But the moment I press - the background seems to jump.
I’ve tried changing the car’s Input checks to FixedUpdate, and the camera itself is being updated on LateUpdate, but I’m not sure what’s going on?
Here’s the code I’m working with:
Camera Follow:
void LateUpdate()
{
transform.position = followTarget.transform.position + new Vector3(0,0,-zDepth);
}
And in the driver code:
float steerAmt = Input.GetAxis("Horizontal") * -steerSpeed * Time.deltaTime;
float moveAmt = Input.GetAxis("Vertical") * moveSpeed * Time.deltaTime;
transform.Translate(0,moveAmt,0);
transform.Rotate(0,0,steerAmt);