Skip to content

fix anims interpolating from 0 instead of valid initial data#76

Open
RetroZelda wants to merge 1 commit intoHailToDodongo:mainfrom
RetroZelda:fix/jank-animation
Open

fix anims interpolating from 0 instead of valid initial data#76
RetroZelda wants to merge 1 commit intoHailToDodongo:mainfrom
RetroZelda:fix/jank-animation

Conversation

@RetroZelda
Copy link
Copy Markdown

kfCurr and kfNext are zero from calloc(line 53|54). Without priming them, the first t3d_anim_update() interpolates from zero toward the first keyframe value, causing bones to blend in from the origin.

This will read the first keyframe for every channel so kfNext holds real data, then mirror it into kfCurr so both ends of the interpolation start at the actual first-frame pose. rewind_anim() resets timeEnd and the file position without touching kfCurr/kfNext, leaving the animation ready for normal playback at t=0.

Before:
image

After:
image

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.

1 participant