Camera follow smoothness problem

Camera is moving too smooth how can i make it to be fast? tried messing around with my smoothTime variable but no success.
code:

 public var player : GameObject;
 	var smoothTime = 0.0;
	private var yVelocity = 0.0;
 
 function Update () 
 {
		var newPosition : float = Mathf.SmoothDamp(transform.position.y, player.transform.position.y+7.7f, yVelocity, smoothTime);                     
		transform.position = Vector3(transform.position.x, newPosition, transform.position.z);
	
 }

EDIT: Actually i dont even need smoothness, but i need this because im changing the camera folow position, camera’s normal following position is players - 5f but when the player dies i want to change my camera’s position to -8f but if I do it with normal camera follow script its changing instantly and its not nice, so i need the camera to shift from -5 to -8.

Try:

var newPosition : float = Mathf.SmoothDamp(transform.position.y, player.transform.position.y+7.7f, yVelocity, smoothTime*Time.deltaTime);

Time.deltaTime tells the code that you want it run in real time not according to FPS (Frames Per Second)…

Sorry, I’m a bit of a noob, but hope this achieves what you’re looking for :slight_smile: