godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.32k stars 21.24k forks source link

[TRACKER] Blending with AnimationPlayer is not working correctly #73537

Open TokageItLab opened 1 year ago

TokageItLab commented 1 year ago

Issue description

This is a tracker for a problem with AnimationPlayer blending not working as expected.

May be fixed by:

Backlink to the tracker tracker. https://github.com/orgs/godotengine/projects/58/views/3

- [ ] https://github.com/godotengine/godot/issues/70207
- [ ] https://github.com/godotengine/godot/issues/72484
- [ ] https://github.com/godotengine/godot/issues/50280
- [ ] https://github.com/godotengine/godot/issues/36279
- [ ] https://github.com/godotengine/godot/issues/27509
- [ ] https://github.com/godotengine/godot/issues/70123
- [ ] https://github.com/godotengine/godot/issues/70338
- [ ] https://github.com/godotengine/godot/issues/79020

If there is anything else, please comment.

limbonaut commented 1 year ago

76127 is related.

9cg commented 1 year ago

It doesn't show the correct behaviour locally. Strangely, other players see the expected behaviour in multiplayer when AnimationPlayer is synchronised with MultiplayerSynchronizer.

TokageItLab commented 1 year ago

The most major issues have been resolved, but some of the rest will need a bit major fixes for minor updates, so I would punt them to 4.3.

bertodelrio256 commented 1 month ago

I'm using 4.3 and noticed intermittently the custom blend time when calling .play() is ignored/defaulted. weird thing is I tried to create an MRP calling .play() at different times with different blend times, but it seemed to work fine so I canceled the issue. but in my production project, I'm seeing some blends just being ignored while others work fine. perhaps I'm not understanding how it works.. my assumption is the if I call .play("anim1", 0.3f) in process and then called .play("anim2", 3.0f) it should take 3 seconds to blend to that one right? I'm making many calls to animations before they finish with different blend times, could that be causing the issue? does the blend need to be reset somehow first?

TokageItLab commented 1 month ago

I'm making many calls to animations before they finish with different blend times

@bertodelrio256 If you are calling the same animation many time before finish blending, I assume there is some problem, related https://github.com/godotengine/godot/issues/72484.

bertodelrio256 commented 1 month ago

I'm making many calls to animations before they finish with different blend times

@bertodelrio256 If you are calling the same animation many time before finish blending, I assume there is some problem, related #72484.

ahh interesting. So a queue is filled when calling multiple. I think my issue could be resolved perhaps by only doing one call to .play() per physics tick and just have my states just change the string that it uses for that one call.

anyway looking forward to what you come up with in the new blending system. I hate using animation trees. honestly being able to everything in code would be a dream.

bertodelrio256 commented 1 month ago

I just wanted to mention that I was able to resolve all of the blending issues by only calling .play once if the animation changed. looks like you cannot call .play every frame or the blends wont work...

if(anim_player.AssignedAnimation != current_clip)
        {
            anim_player.Play(current_clip, current_clip_blend);
        }