Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blending 3 orthogonal properties does not work properly in AnimationTree #79414

Closed
BimDav opened this issue Jul 13, 2023 · 4 comments
Closed

Comments

@BimDav
Copy link
Contributor

BimDav commented Jul 13, 2023

Godot version

3.5.stable

System information

Macos

Issue description

In an AnimationTree, blending 2 animations that affect orthogonal properties, for example a Sprite's x and y coordinates, works properly: The Sprite moves diagonally.
Blending a third animation that affects an orthogonal property, for example the Sprite's modulate color, also works properly: The Sprite moves diagonally and the color changes

But if the first 2 animations both affect the same 2 properties, for example they both affect a Sprite's x and y coordinates, then blending in the third animation which affects a completely orthogonal property such as the color, will change the behavior on the first 2 properties.

As this is difficult to explain, please see the attached mini project.

Steps to reproduce

In the attached mini project, observe that changing the blend_value of the Blend2ToChange Node changes the trajectory of the Sprite, even though the color Animation does not affect the Sprite's position at all.

For comparison, notice that after changing the animation in the AnimationToChange Node from "horizontal with overlap" to "horizontal", then changing the blend_value of the Blend2ToChange Node does not change the trajectory of the Sprite, which should be the correct behavior.

Minimal reproduction project

animationtree.zip

@TokageItLab
Copy link
Member

TokageItLab commented Jul 16, 2023

Dupe of #46038. Fixed in 4.0 by #57675 and it is no planned backporting due to the breaking compatibility.

@TokageItLab TokageItLab closed this as not planned Won't fix, can't repro, duplicate, stale Jul 16, 2023
@BimDav
Copy link
Contributor Author

BimDav commented Jul 18, 2023

I don't quite agree that it is fixed in 4.0, at least for my use case. I think that blending in animations that don't share properties should just add the animations. I don't see a usecase where we would rather them be blended toward an arbitrary 0, is there one?

@TokageItLab
Copy link
Member

Since the #60093 was sent after #57675, the RESET animation can be used to set any value as the initial value.

See also https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#for-better-blending

hould just add the animations. I don't see a usecase where we would rather them be blended toward an arbitrary 0, is there one?

Just adding it is not technically possible at this time. It does not provide deterministic blending because it would change the blending result depending on the order in which the blend values were changed.

For backward compatibility, we are considering in godotengine/godot-proposals#5972 how to set the initial value dynamically in some way, so it is possible that a better solution will be provided in the future.

However, please understand that it will not be backported to 3.x.

@BimDav
Copy link
Contributor Author

BimDav commented Jul 18, 2023

That's very cool, thanks for the additional details! The Godot 3 behavior will do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants