This topic is now archived and is closed to further replies.

Smoothing a variable in time

This topic is 5306 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I have to smooth the value of a variable (x) over the time. The formula I''m using is: x = x*alpha + NewX*(1-alpha) with some smoothing parameter ''alpha'' in the interval [0,1]. This code is called once per frame, my problem is that the "smoothing velocity" of the variable clearly depends on frame rate. I have the time passed since last calculation. How can I use this time parameter to make sure that the smoothing velocity is always the same regardless of the framerate? Any idea? Thanks.

Share this post

Link to post
Share on other sites