AnimationTransitions
AnimationTransitions
- main_animation : core::option::Optionpetgraph::graph::NodeIndex
- transitions : alloc::vec::Vec<bevy_animation::transition::AnimationTransition>
Description
Manages fade-out of animation blend factors, allowing for smooth transitions between animations.
To use this component, place it on the same entity as the [
AnimationPlayer
] andAnimationGraphHandle
. It'll take responsibility for adjusting the weight on the [ActiveAnimation
] in order to fade out animations smoothly.When using an [
AnimationTransitions
] component, you should play all animations through the [AnimationTransitions::play
] method, rather than by directly manipulating the [AnimationPlayer
]. Playing animations through the [AnimationPlayer
] directly will cause the [AnimationTransitions
] component to get confused about which animation is the "main" animation, and transitions will usually be incorrect as a result.