Camera follow player jumping?

Hello Unity3D i am having a problem with the camera following the player jumping.How do i make it that the camera follows my character to the air while my character is in the air?The reason i ask this question is the fact that when my character jumps in the air(my character jumps high by the way)It leaves the screen and the camera stays at the same position how can i make it that when my character jumps the player follows?

You have to look for Camera follow script from forum and directly use that one for your requirements.

I have attached some example here that might work for you.

Smooth Follow Camera

2D Camera “Smooth Follow”

So is the camera already following the player’s X and Z position right now?

If you need a quick script answer:

var target : Transform; //In inspector, drag and drop the character gameobject that you want your camera to follow
var followSpeed : float = 10;

function Update()
{
  transform.position.y = Mathf.Lerp(transform.position.y, target.position.y, Time.deltaTime * 10)
}

So attach this simple script on your camera, thend drag your player gameobject onto the “target” slot in your inspector, and the camera should smoothly follow your character’s position.y. You can increase or decrease the “followSpeed” variable value to make the follow speed faster or slower