Skip to content

Commit 1025d6f

Browse files
committed
Merge pull request #112047 from TokageItLab/fix-pp
Separate branching ping-pong time and delta
2 parents decb559 + 7768dea commit 1025d6f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scene/animation/animation_blend_tree.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,14 @@ AnimationNode::NodeTimeInfo AnimationNodeAnimation::_process(const AnimationMixe
268268
AnimationMixer::PlaybackInfo pi = p_playback_info;
269269
pi.start = 0.0;
270270
pi.end = cur_len;
271-
if (node_backward ? cur_backward : !cur_backward) {
271+
if (play_mode == PLAY_MODE_FORWARD) {
272272
pi.time = cur_playback_time;
273-
pi.delta = cur_delta;
274273
} else {
275274
pi.time = anim_size - cur_playback_time;
275+
}
276+
if (node_backward ? cur_backward : !cur_backward) {
277+
pi.delta = cur_delta;
278+
} else {
276279
pi.delta = -cur_delta;
277280
}
278281
pi.weight = 1.0;

0 commit comments

Comments
 (0)