How do you smoothly interpolate objects (camera, player...) ? Vinterp not working

Hey guys I am doing a game where the player as the ability to teleport from a point A to point B. The script is perfectly working however I have a problem.
For visual sake, i’m trying to smoothly interpolate the player and/or the camera but I can’t figure a way to do It.

My script works with Line trace channels, When the teleport input is pressed the player moves to the location of the hit. Problem being that it’s a straight jump, i’ve already tried with vInterp but two things can happen depending on the interpolation speed, first one being that the interpolation speed is to low and the character moves just a bit, second one being that the interpolation speed is to high and the player instantly teleports. Can you help me ? :frowning:

Have you tried camera arm with some lag enabled?
You could also add some logic in script how much lagg you allow depending on distance.
Something like: calculate distance, enable lag, calculate amount of it, teleport, then disable lag.
And for better control over lag, you could use float function that scales lag depending on distance.
I also think that arm lag iscontrolled by maximum follow speed (not quite sure about this), so you could try to calculate amount of lag based of time for camera to travel it and distance, so you can get max speed for lag.

If that does not work for you only alternative is interpto, but then you need more logic into it than simply vinterpto values.

You could try iTween. It was developed specifically for situations like this.

Thanks iTween does it perfectly ! As for the camera arm it was also pretty convincing however it gives less control :slight_smile:

you can always use “ease” . You just need to set a mechanism for “alpha” value - goes from 0 to 1. You can select any function type.