vector3.lerp to a moving point

hello again,
i’m trying to script the camera for my game. The only thing left to fix is that the camera is quite jerky. Im pretty sure this is because i have the camera move towards a target point using vector3.Lerp, but since the target position is moving, this would cause the lerp equation to be off?

right now, im using the method of saving the camera position in var lastPosition and then moving to my wanted position and then saving that as var targetPosition. Then i do vector3.lerp(lastPosition, targetPosition, Time.deltaTime * damp).

keep in mind, the targetPosition is never the same as it was the last frame. this is what seems to be the problem.

thanks in advanced :slight_smile:

Try moving your camera towards a specific spot by giving it a rigidbody and changing its velocity. That should smooth things out a bit, so long as you change the magnitude of the velocity based on distance.

well, i gave what you said a try, but it didn’t really seem to work much differently then my system i already had. what i ended up doing was attaching the script i had originally make for the camera and put it on an empty game object, then i just gave the camera the standard smoothfallow script and make the target the empty game object. kind of lazy of me but hey, it works.