Just a disclaimer, this isn’t a debate type thread, it’s just me needing some advice.
Basically, I got a line for smoothly moving the camera with Lerp (currently commented out), and I’ve got a line that uses SmoothDamp instead.
I managed to get both to look exactly the same. The smoothing speed looks the same, there’s no jittering or anything on either of them, and everything just looks the same.
So my question is, which one should I use? Does one take less power/time to process? Or is there no clear/distinct difference?
Lerp is linear based on a value. Smoothdamp is automatically smoothed based on position and isn’t linear.
Well I already knew that. I read about both of them before first deciding which one to use.
But would using one over the other have any major differences in terms of performance? Like I said, I got both to act the same, and the player’s movement speed will almost never be altered, and if it will, it will be barely visible.
Also, keep in mind the game this is for, is a 2D sidescroller. So not a lot of in-depth movement going on (actually none at all).
Lerp is probably less expensive depending on the rest of what you are doing. But overall in that case there would be no significant difference. Smoothdamp is basically using lerp with some extra functionality.
1 Like