Open VZout opened 2 years ago
Having the same issue.
@h3r2tic Do you have an idea where in the code the bug is ? I would like to have a look, thanks
I think it's there: https://github.com/h3r2tic/dolly/blob/main/src/util.rs#L33-L55 ?
Don't know how the issue looks, so it would be hard for me to guess :sweat_smile: I don't currently have much time to investigate, sorry. I've seen issues with the look-at transform still having some numerical trouble; I've also seen cases where exp with large numbers can give NaNs, and also cases of quats "overflowing", and then (s)lerp suddenly switching to the other direction.
I'll take a look 👌
That's awesome, thanks :D
I've dig into it a bit:
Some possible tracks:
interpolate
should not use delta time based for it's Lerp1 ?1: https://gamedevbeginner.com/the-right-way-to-lerp-in-unity-with-examples#lerp_slowing_down
In my tests, moving the mouse real fast, produced an interp_t
of around 0.06f32 which is not much, and could cause the lerp to be wrong? I don't know much
The whole point of ExpSmoothed
however is to create exponential smoothing just as the article shows, where the slowing down is a feature :sweat_smile:
Ohhh alright 🤔 Then maybe the problem is more around interp_t?
I think there is less problem using the ExpSmoothed like you did, because in the article, it is using delta time, so it's always a small number, thus always on the slow part of the Lerp
Here the function is greatly helping the smoothing, I think ?
The main difference is the framerate independence via the interp_t
thing.
Very high rotational smoothing values in combination with high sensitivity causes the camera to snap (to the closest quat rotation) and roll which is mildly dizzying 😅