smooth transition between vector3's for camera zoom (not simple camera distance)

in the project I’m working on I want camera zoom to go from a high point far above the character allowing near overhead wide range view showing an area of several buildings around the player, to a low point that is just above and behind the player zoomed to show roughly the room the player is in and from a much more angled (horizontal) look.

the max zoom out location is 0,45,-20 from the player, the max zoom in is 0,5.5,-6 from the player

as far as changing the angle to make sure the player is still center camera i can just update the .lookat every time the camera moves, but I want to know the best way to smoothly change between the points using the scroll wheel, so that i can stop anywhere in between.

Vector3.Lerp() or Vector3.MoveTowards() will accomplish what you’re looking for.

using lerp was my first thought

but i cant seem to achieve the smoothness that I want

right now it’s setup with lerp and it does move from 1 point to the other, but gives me a few things I dont like

  1. the last 15% or so of zooming is incredibly slow and I dont want to have to force this jump cause it’s large enough to look jarring to the player

  2. right now it’s not giving me a smooth transition, if I move the scrollwheel up or down it jumps in an instant from current camera location to the new location along the line

thanks for the response, should have mentioned i was attempting lerp first.

Sounds like you’re not using Lerp correctly, most likely you’re using Time.deltaTime as your t parameter. Check out this article for more information: How to Lerp like a pro | Chico Unity3D