mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Separate branching ping-pong time and delta
This commit is contained in:
parent
084d5d407e
commit
7768deaa04
1 changed files with 5 additions and 2 deletions
|
|
@ -268,11 +268,14 @@ AnimationNode::NodeTimeInfo AnimationNodeAnimation::_process(const AnimationMixe
|
|||
AnimationMixer::PlaybackInfo pi = p_playback_info;
|
||||
pi.start = 0.0;
|
||||
pi.end = cur_len;
|
||||
if (node_backward ? cur_backward : !cur_backward) {
|
||||
if (play_mode == PLAY_MODE_FORWARD) {
|
||||
pi.time = cur_playback_time;
|
||||
pi.delta = cur_delta;
|
||||
} else {
|
||||
pi.time = anim_size - cur_playback_time;
|
||||
}
|
||||
if (node_backward ? cur_backward : !cur_backward) {
|
||||
pi.delta = cur_delta;
|
||||
} else {
|
||||
pi.delta = -cur_delta;
|
||||
}
|
||||
pi.weight = 1.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue