Hello, I recently got into Godot and now I'm following a bunch of tutorials on how to implement FPS movement. So far I successfully programmed character movement, jumping and gravity (it's not much, but still). After that, I wanted to make a dash mechanic similar to ULTRAKILL - a quick, horizontal dodge. The dash method I have right now actually works well in relation to directions and velocity, but my issue is about the camera. When I dash, it simply teleports from one point to another and I want to make it so it smoothly transitions during the state. I know it's possible to do something with linear_interpolate() or lerp(), but I just can't figure it out.

Here's the function for receiving input weight:

 func _get_directions() -> Vector3:
	var z: float = ( Input.get_action_strength("backward") - Input.get_action_strength("forward") )
	var x: float = ( Input.get_action_strength("right") - Input.get_action_strength("left") )
	x_angleLerp = x * -3
	return transform.basis.xform(Vector3(x, 0, z)).normalized() 

Here's the function for processing movement:

 func _physics_process(delta):	
	if Input.is_action_pressed("ui_cancel"):
		get_tree().quit()
	input_move = _get_directions()
	if Input.is_action_just_pressed("sprint") and can_dash and input_move != Vector3.ZERO:
		_dash(input_move, delta) #function for dashing	
	if not is_on_floor():
		gravity_local += Vector3.DOWN * GRAVITY_ACCELERATION * delta
	else:
		gravity_local = GRAVITY_ACCELERATION * -get_floor_normal() * delta		
	if Input.is_action_just_pressed("jump") and is_on_floor():
		gravity_local = Vector3.UP * JUMP_SPEED 
	lookPivot.rotation_degrees.z = lerp(lookPivot.rotation_degrees.z, x_angleLerp, 0.1)
	move_and_slide((input_move * MAX_SPEED) + gravity_local , Vector3.UP) 

And finally, the dash function:

 func _dash(input_move, delta):	
	velocity = velocity.linear_interpolate((input_move * MAX_SPEED) * DASH_SPEED, DASH_ACCELERATION * delta)
	move_and_slide(velocity)
	can_dash = false
	yield(get_tree().create_timer(1.5), "timeout")
	can_dash = true 

in any case, here's the full code:

You're calling _dash() only on the frame when the dash button was pressed, while you need to maintain proper velocity at all frames while dash action is active. You might also want to have some animations (like charging, dashing, recovery), so it would be beneficial to create an animation for those states. Then, in an animation editor you can create a Bezier track and use it to define how speed changes throughout animation. In your character, create a custom property (like current_speed) and set it as property for bezier track. Then inside you _physics_process() favor that speed value. You can also use Call method tracks to let your character controller know that special move animation is playing and it needs to favor it (do physics, e.g. calculate velocities, differently).