TimeScale node: scale return value (time remaining).
This commit is contained in:
parent
20308c0475
commit
2e1b1234a3
|
@ -637,10 +637,12 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
|
|||
} break;
|
||||
case NODE_TIMESCALE: {
|
||||
TimeScaleNode *tsn = static_cast<TimeScaleNode*>(nb);
|
||||
float rem;
|
||||
if (p_seek)
|
||||
return _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time,switched,true,p_filter,p_reverse_weight);
|
||||
rem = _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time,switched,true,p_filter,p_reverse_weight);
|
||||
else
|
||||
return _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time*tsn->scale,switched,false,p_filter,p_reverse_weight);
|
||||
rem = _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time*tsn->scale,switched,false,p_filter,p_reverse_weight);
|
||||
return rem / tsn->scale;
|
||||
|
||||
} break;
|
||||
case NODE_TIMESEEK: {
|
||||
|
|
Loading…
Reference in New Issue