Lerp

I’m trying to get my box to lerp smoothly when dismissing. This is very basic so I’m just trying to get lerp setup, then actually getting position setup. Anyway, lerp isn’t working. Was wondering if someone could find what I’m doing wrong. (I’ve only included what I think is important since code is private to SGM Servers, don’t wana be considered leaking)

-snip- Private code, fixed. No need to be public

Lerp shouldnt be on its own (i believe, im kinda new to lerp aswell)



Lerp(sum/1.5, 25, 300) -- this shouldnt be on its own


since im quite confused by your code im gonna try and explain this

the first arg is the speed basically
the second should be the variable you are setting
and the last arg is the target value of what you are lerping to



sum =Lerp(10*FrameTime(), sum, 300)


hope this helps in someway

Hmm, your code and my code do the same problem
-snip video-

hmm, i understand what your doing now though, i think it has something to do with your sum = sum line, try using my code from above and removing sum=sum

I did and I got the same problem.

okay, lol second guess: it has something to do with Lerp being inside the DoClick function?

Thanks for the help everyone! with a bit of tweaking I got it to work