![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | SlavJuan |
so if i use lerp does it use delta or does it go on pc power
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | SlavJuan |
so if i use lerp does it use delta or does it go on pc power
![]() |
Reply From: | djmick |
Lerp does not use delta but you can just multiply the third argument of the lerp by delta if you want it to run smoothly on a different powered pc.
![]() |
Reply From: | iamjoeysox |
No, lerp doesn’t account for delta time. Also, the other answer isn’t exactly correct and if you run the tests you’ll see for yourself the math is wrong.
The following is the correct math:
a = lerp(a, b, 1 - f ^ dt)
I think this would work in actual code inside the Godot Editor:
a = lerp(a, b, 1 - pow(f, dt))
What is “f”?
SteveSmith | 2023-02-01 14:45
f
is some float between 0 and 1, (e.g. 0.1
)
russmatney | 2023-06-17 19:00