Horrible Camera Stutter / Jitter When Following Player

So for the last 4 days I have tried everything and no matter what I get horrible character jitter and the culprit I believe is the camera.

I am using the same camera script “CameraFollow” that is used in the 2D sample package from the asset store.

I’ve tried various things including FixedUpdate, LateUpdate, Fixed Timestep Settings. Nothing Works!
Here is a sample of what’s happening. http://epicgamerworld.com/characterTest/characterTest.html

The only solution I have found is to make the camera a child of my game character. This fixes all the stutter and the animation plays smoothly like it should. The only problem is my character does do back flips and front flips and the camera follows the player’s rotation so the camera ends up upside down and the game is un playable.

If anybody has any information or advice it would be greatly appreciated because I have been stuck on this forever.

I went through this a while back as well. I think I had it fixed with this script;

public class CameraFollow2D : MonoBehaviour {
	
	public float dampTime = 0.15f;
	private Vector3 velocity = Vector3.zero;
	public Transform target;
	
	// Update is called once per frame
	void FixedUpdate () 
	{
		if (target)
		{
			Vector3 point = camera.WorldToViewportPoint(target.position);
			Vector3 delta = target.position - camera.ViewportToWorldPoint(new Vector3(0.5f, 0.35f, point.z)); //(new Vector3(0.5, 0.5, point.z));
			Vector3 destination = transform.position + delta;
			transform.position = Vector3.SmoothDamp(transform.position, destination, ref velocity, dampTime);
		}
		
	}
}

Attach to the camera, then drag your player object into the inspector as “target” on this script

Let me know if that works, if not then I must have grabbed the wrong script and will have to dig further back

There is a huge improvement with this script thank you!
Still have a little problem though : (
I have to set the Damp Time to 1.6 for it to smooth out the movement. This causes the camera to lag behind, allowing the player to run out of camera range.
There is a night and day improvement with this script, however the character is still jittery, and the leg animations still look choppy.

When I make the camera a child of the player object, the animations are perfect and everything is 100% smooth.

Could I maybe freeze the rotation of the camera and make it a child of the player object?
Since I haven’t seen anybody do this, I’m assuming it’s wrong to child the camera to the player.

Thanks to your script the game is at least playable now, I just wish there was a way to have it follow the player without the jitter.
There has to be a way…