Small Problem with Camera Movement!

Hey i have a quick question. I want to move the camera not infinitely fast, i want to move it over time. So i tried this, i can move the camera up but its still infinitely fast :(. Thanks for taking your time!

public void yFlyUp()
{

    
    NewY += 1f;

    var Geschwindigkeit = 20f;
    var Richtung = new Vector3(0f, NewY, -10f);
    
    this.transform.position += Richtung * Geschwindigkeit * Time.deltaTime;
    
}

}

Okay, I got it,
here a solution (I hope)

just replace your code with this :

 public void yFlyUp()
 {
     NewY += 1f;

     var Geschwindigkeit = 20f;
     var Richtung = new Vector3(0f, NewY, -10f);   
 }
public void Update()
{
 this.transform.position += Richtung * Geschwindigkeit * Time.deltaTime;  
}

Thanks mate, but i got a new problem the nameRichtung and Geschwindigkeit does not exist in the current context :frowning: