-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using rotational smoothing causes snapping and camera roll #11
Comments
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 😅 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:
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 |
The whole point of |
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 |
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 😅
The text was updated successfully, but these errors were encountered: