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

AnimationTree animation string values are superseded by RESET animation values when using Continuous update mode #69591

Closed
my-koala opened this issue Dec 5, 2022 · 5 comments · Fixed by #84815

Comments

@my-koala
Copy link

my-koala commented Dec 5, 2022

Godot version

4.0.beta7

System information

Windows 10

Issue description

animation_tree_issue.mp4

AnimationPlayer has two animations: 'RESET' and 'animation'.
'RESET' sets the Label's text to "RESET", and the Label's modulate to Color.RED.
'animation' sets the Label's text to "animation", and the Label's modulate to Color.GREEN.
Both tracks are using the Continuous update mode.
The AnimationTree is set up to play 'animation' only.

What's expected when activating AnimationTree: Label is green with text "animation".
What actually happens: Label is green with text "RESET".

Changing update mode to Discrete or Trigger works as expected. Capture mode is, uh, also broken but in another way beyond my comprehension.

Steps to reproduce

  1. Open MRP.
  2. Observe animations.
  3. Set AnimationTree to active.
  4. Observe unexpected results.

Minimal reproduction project

animation_tree_issue_587213874635874.zip

@TokageItLab
Copy link
Member

The problem with this is that blend_variant() does not support String types in the first place.

Although interpolate_variant() supports String type, we need to consider whether it can be defined for blend_variant() as well.

@TokageItLab
Copy link
Member

TokageItLab commented Dec 5, 2022

I feel it is an interesting problem, but not an easy one.

For example, when there are three Strings "abcde" "fgh" "ij" and three blend inputs 0.2, 0.5, 0.3, I have no idea on how to blend it consistently neatly. It is difficult to mix strings, so even if one of the strings is prioritized, there will probably be inconsistencies that depend on the iterated order.

@akien-mga
Copy link
Member

akien-mga commented Dec 5, 2022

I don't think it makes sense to try to blend strings. If anything that's something users would have to implement themselves as there's many different ways to do it based on the intended effect.

For non blendable Variant types, we should just force a discrete mode. Maybe also show a warning to let people know Continuous mode on Strings (or other non blendable Variants) doesn't make sense.

@lufog
Copy link
Contributor

lufog commented Mar 28, 2023

I also encountered a situation where an animation not used in an AnimationTree is still applied to some extent. Is this the same problem, or should I open a new issue?

2023-03-28.23-06-25.mp4

AnimTreeModulate_Test.zip

@TokageItLab
Copy link
Member

@lufog It seems that your problem is just AnimationPlayer and AnimationTree applying at the same time.

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

Successfully merging a pull request may close this issue.

4 participants