-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Advance expression for AnimationTree doesn't seem to work #62530
Comments
I'll take a look. Is length a const method? |
It's the native method from Vector3. I think that it is a const method, but I also tried methods that are not const and it didn't work. |
You can set the expression to simply |
I also just noticed that which node I assign to Advance Expression Base Node doesn't matter. The expression will always be executed in the context of the AnimationTree node. |
any news about this? |
Hey, I've created a new pull request #63238 that solves this issue |
Nice. I have a theory about the second issue: why not even When you set the node property in the inspector on the transition, the editor makes a path that is relative to the scene root. The path is then used relative to the AnimationTree node with I assume this happens because |
Not a theory, I checked this and it is what happens. I'm not sure how to solve that |
Maybe the solution is to take a step back. Should this base node property exist on the individual transitions in the first place? It creates dependencies deep inside a nested resource on the structure of the node tree in which the resource will be used. Doesn't seem like something that should be encouraged. |
It seems that the issue is still present in alpha17, no matter the expression you put, even if you write I don't think attaching a reproduction project is needed because it's simply the same issue as OP - or simply write |
@alfredbaudisch Are you setting the Expression Base Node field directly on the transition? There were two parts to this issue. One was fixed and one was not. IIRC, if you set the expression base node only on the animation tree and not on the transition then it should work now. That field should be removed from the transition node unless someone can figure out a solution. |
Yep, precisely what @permelin said. If you leave the Base Node blank, it will work (and use the animation tree node as the source for the variables). |
That was it, thanks. Confirmed the issue as you said: setting in the animation tree directly made it work, on the other hand the transition base node is ignored / has no effect. |
@akien-mga I was testing and my previous fix does not work if there are autoloaded nodes in the tree, this issue should probably be reopened. |
Thanks for testing! |
I'm sorry for not testing it in depth to begin with! |
Godot version
v4.0.alpha.calinou [caa9ec8]
System information
Windows 10, Vulkan
Issue description
I'm using a simple state machine within the AnimationTree
Along with Advance Expressions like (this one is for idle_1 to walking):
However, it simply doesn't trigger the transition
Steps to reproduce
Minimal reproduction project
TestExpressions.zip
The text was updated successfully, but these errors were encountered: