@@ -934,7 +934,6 @@ void AnimationTree::_process_graph(real_t p_delta) {
934
934
t->process_pass = process_pass;
935
935
t->loc = Vector3 ();
936
936
t->rot = Quaternion ();
937
- t->rot_blend_accum = 0 ;
938
937
t->scale = Vector3 (1 , 1 , 1 );
939
938
}
940
939
@@ -995,7 +994,6 @@ void AnimationTree::_process_graph(real_t p_delta) {
995
994
t->process_pass = process_pass;
996
995
t->loc = Vector3 ();
997
996
t->rot = Quaternion ();
998
- t->rot_blend_accum = 0 ;
999
997
t->scale = Vector3 (1 , 1 , 1 );
1000
998
}
1001
999
@@ -1047,14 +1045,7 @@ void AnimationTree::_process_graph(real_t p_delta) {
1047
1045
continue ;
1048
1046
}
1049
1047
1050
- if (t->rot_blend_accum == 0 ) {
1051
- t->rot = rot;
1052
- t->rot_blend_accum = blend;
1053
- } else {
1054
- real_t rot_total = t->rot_blend_accum + blend;
1055
- t->rot = rot.slerp (t->rot , t->rot_blend_accum / rot_total).normalized ();
1056
- t->rot_blend_accum = rot_total;
1057
- }
1048
+ t->rot = (t->rot * Quaternion ().slerp (rot, blend)).normalized ();
1058
1049
}
1059
1050
#endif // _3D_DISABLED
1060
1051
} break ;
@@ -1066,7 +1057,6 @@ void AnimationTree::_process_graph(real_t p_delta) {
1066
1057
t->process_pass = process_pass;
1067
1058
t->loc = Vector3 ();
1068
1059
t->rot = Quaternion ();
1069
- t->rot_blend_accum = 0 ;
1070
1060
t->scale = Vector3 (1 , 1 , 1 );
1071
1061
}
1072
1062
0 commit comments