jaakkoj
jaakkoj

Reputation: 131

delta-time Versus raw-delta-time (difference?)

I'm implementing FPS style mouselook and keyboard controls. Using delta-time to mult stuff. And i can choose between delta and raw delta.

What is the difference? About non-raw delta DOCS say, "Might be smoothed over n frames vs raw".

What will i do to my code/game if i choose to use non smooth over smooth?

Since the docs say "Might be smoothed"... now thats not fun, that means a bunch of questions.

I'm looking at differend ways to "smooth" the transforms.

EDIT: I think the real question is that, if smoothed delta is a type of calculation based on raw delta. And while i find some people saying that smooth delta is giving them weird results. Then would i be better of writing my own calculation using raw delta...

Upvotes: 0

Views: 537

Answers (1)

SteveL
SteveL

Reputation: 3389

What you are asking is not clear.Smoothed delta means that the current delta time is not the real difference from the beginning of the frame to the end but it has be smoothed and its the average delta of say the last 100 frames. Smoothed delta is preferred if you want to avoid "cracks" in movement when for some reason the delta of a frame is way higher than the previews frames. An easy way to calculate the Smoothed delta is this:

smoothedDelta= rawDelta * 0.01f + smoothedDelta * 0.99f;

Upvotes: 1

Related Questions