You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
Use the blend parameter passed to blend_animation during graph processing
This commit is contained in:
@@ -820,6 +820,7 @@ void AnimationTree::_process_graph(float p_delta) {
|
|||||||
Ref<Animation> a = as.animation;
|
Ref<Animation> a = as.animation;
|
||||||
float time = as.time;
|
float time = as.time;
|
||||||
float delta = as.delta;
|
float delta = as.delta;
|
||||||
|
float weight = as.blend;
|
||||||
bool seeked = as.seeked;
|
bool seeked = as.seeked;
|
||||||
|
|
||||||
for (int i = 0; i < a->get_track_count(); i++) {
|
for (int i = 0; i < a->get_track_count(); i++) {
|
||||||
@@ -839,7 +840,7 @@ void AnimationTree::_process_graph(float p_delta) {
|
|||||||
|
|
||||||
ERR_CONTINUE(blend_idx < 0 || blend_idx >= state.track_count);
|
ERR_CONTINUE(blend_idx < 0 || blend_idx >= state.track_count);
|
||||||
|
|
||||||
float blend = (*as.track_blends)[blend_idx];
|
float blend = (*as.track_blends)[blend_idx] * weight;
|
||||||
|
|
||||||
if (blend < CMP_EPSILON) {
|
if (blend < CMP_EPSILON) {
|
||||||
continue; //nothing to blend
|
continue; //nothing to blend
|
||||||
|
|||||||
Reference in New Issue
Block a user