mirror of
https://github.com/bevyengine/bevy
synced 2024-09-20 14:32:06 +00:00
650e7c9eb4
# Objective fix #14742 ## Solution the issue arises because "finished" animations (where current time >= last keyframe time) are not applied at all. when transitioning from a finished animation to another later-indexed anim, the transition kind-of works because the finished anim is skipped, then the new anim is applied with a lower weight (weight / total_weight) when transitioning from a finished animation to another earlier-indexed anim, the transition is instant as the new anim is applied with 1.0 (as weight == total_weight for the first applied), then the finished animation is skipped. to fix this we can always apply every animation based on the nearest 2 keyframes, and clamp the interpolation between them to [0,1]. pros: - finished animations can be transitioned out of correctly - blended animations where some curves have a last-keyframe before the end of the animation will blend properly - animations will actually finish on their last keyframe, rather than a fraction of a render-frame before the end cons: - we have to re-apply finished animations every frame whether it's necessary or not. i can't see a way to avoid this. |
||
---|---|---|
.. | ||
bevy_a11y | ||
bevy_animation | ||
bevy_app | ||
bevy_asset | ||
bevy_audio | ||
bevy_color | ||
bevy_core | ||
bevy_core_pipeline | ||
bevy_derive | ||
bevy_dev_tools | ||
bevy_diagnostic | ||
bevy_dylib | ||
bevy_dynamic_plugin | ||
bevy_ecs | ||
bevy_encase_derive | ||
bevy_gilrs | ||
bevy_gizmos | ||
bevy_gltf | ||
bevy_hierarchy | ||
bevy_input | ||
bevy_internal | ||
bevy_log | ||
bevy_macro_utils | ||
bevy_math | ||
bevy_mikktspace | ||
bevy_pbr | ||
bevy_ptr | ||
bevy_reflect | ||
bevy_render | ||
bevy_scene | ||
bevy_sprite | ||
bevy_state | ||
bevy_tasks | ||
bevy_text | ||
bevy_time | ||
bevy_transform | ||
bevy_ui | ||
bevy_utils | ||
bevy_window | ||
bevy_winit |