Skip to content
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

Fix walk stuttering with Preview Frame #3950

Merged
merged 1 commit into from
Jan 15, 2022
Merged

Conversation

obligaron
Copy link
Contributor

Fixes a reported issue from @FitzRoyX

Another issue is that obligaron's prediction algo thing is causing some slight wierd abruptness when coming to a stop walking horizontally. It feels like the camera is shifting, I don't know how to explain it

In #2457 (last commit) the time the preview frame was shown was added to the animation distribution to smooth the animation better. But this resulted in a small stuttering, cause GetOffsetForWalking/GetAnimationProgress is also based on this time.
Workaround is to not add preview frame time for the walking animation. Also fixes some casting warnings.

Copy link
Contributor

@ephphatha ephphatha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look reasonable, it's really hard to tell whether I'm getting the same stuttering when walking on master as what FitzRoyX reported though 😅. I noticed both master and this branch are a bit jittery when walking diagonally or north/south but this appears to be due to the way the offset is translated to screen space and isn't related to the animation preview. Walking horizontally is buttery smooth even at 1 game speed.

@AJenbo AJenbo merged commit 2843d99 into diasurgical:master Jan 15, 2022
@obligaron obligaron deleted the adl branch January 15, 2022 17:51
@obligaron
Copy link
Contributor Author

You are right. I also found this limitation while working on initial smooth walking (in #1987 see initial comment).
It could be fixed with a new/enhanced renderer.
But it's also not a great show-stopper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants