Fix critical bugs in animation system: slerp, keyframe sampling, asset loading#65
Draft
Fix critical bugs in animation system: slerp, keyframe sampling, asset loading#65
Conversation
…ion name, asset loading 1. Fix quaternion slerp (AnimSphericalLinear) component assignment - was using wrong components (w instead of y, duplicated w) 2. Fix AnimSampleChannel to properly extract keyframe data and compute interpolation parameter t from actual channel data instead of using uninitialized defaults 3. Fix function name mismatch: SphericalLinear -> AnimSphericalLinear 4. Fix AnimInterpolateLinear to use member operator* (T*float) instead of non-existent free function (float*T) 5. Fix copy-paste bug in AnimationAsset::Load - rotation time was loaded into position.time instead of rotation.time 6. Implement AnimationNodeChannel::Sample() with actual keyframe sampling 7. Add AnimNodeSampleResult struct for node channel sampling output Co-authored-by: bluesky013 <35895395+bluesky013@users.noreply.github.com>
…allback Co-authored-by: bluesky013 <35895395+bluesky013@users.noreply.github.com>
Co-authored-by: bluesky013 <35895395+bluesky013@users.noreply.github.com>
Co-authored-by: bluesky013 <35895395+bluesky013@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Check and enhance animation system
Fix critical bugs in animation system: slerp, keyframe sampling, asset loading
Feb 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Animation system had multiple bugs rendering it non-functional: broken quaternion interpolation, uninitialized keyframe sampling, incorrect asset deserialization, and unimplemented sampling logic.
Quaternion slerp fix (
AnimationInterpolation.cpp)Return value had wrong component mapping. Constructor is
Quaternion(w, x, y, z)but brace-init was{x, w, z, w}:Keyframe sampling fix (
AnimationInterpolation.h)AnimSampleChannelnever populatedvk1/vk2from channel data andtwas always 0 — now properly extracts surrounding keyframes and computes interpolation parameterSphericalLinear()→AnimSphericalLinear()(1-t) * vk→vk * (1-t)—Vector3has no freeoperator*(float, Vector3)Asset loading fix (
AnimationAsset.cpp)Copy-paste error: rotation time data was loaded into
channel.position.timeinstead ofchannel.rotation.time.Implement
AnimationNodeChannel::SampleWas an empty stub. Now delegates to
AnimSampleChannelfor each non-empty channel (position, scale, rotation) and writes results to a newAnimNodeSampleResultstruct.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.