AnimationTree And Layered Animations
Asked Answered
C

3

0

Not sure if I'm missing something here, but I don't see the point in using AnimationTree right now besides the blend spaces, which is a pretty niche use case.

I've seen multiple posts of people claiming that AnimationTree is capable of playing multiple layered 3d animations simultaneously, but none of them actually provided any exampels of it. And I personally cannot find this functionality anywhere in the editor.

On top of that, I noticed that transitions have a "condition" field. Why? I mean I think being able to set conditions for each transition in the inspector would be awesome, but why only allow one? And why is it only ever a bool? Isn't it expected that the user is going to control the state machine in a script via travel() anyway? In that case the conditions seem pointless.

Which brings me to my final point which is... I was playing all my animations through an AnimationPlayer controlled via a script before hand. So what difference does it make changing the script to work with an AnimationTree instead? I can't see any benefit besides the blend trees (which I have no need for right now anyway).

Cher answered 13/2, 2023 at 5:51 Comment(0)
C
1

Cher
I was able to find this set up that allowed me to play layered animations. The AnimaitonTree's "Tree Root" parameter should be set to a blend tree, and in the blend tree there should be two state machines. from there you can either use a blend or add node to mix them into the output, For my case I used the bone filter to ignore the first animation's arm bones.

glad I was able to find this! I'm definitely not used to this system yet, but I'm still confused about the transition conditions.

Cher answered 13/2, 2023 at 16:11 Comment(0)
G
0

Cher Thank you so much for posting your findings. I've been looking around for ideas and this is the only useful thing I've found so far.

Gaylagayle answered 12/3, 2024 at 22:2 Comment(0)
D
0

Cher I noticed that transitions have a "condition" field. Why? I mean I think being able to set conditions for each transition in the inspector would be awesome, but why only allow one? And why is it only ever a bool? Isn't it expected that the user is going to control the state machine in a script via travel() anyway? In that case the conditions seem pointless.

Condition is useless. The field below expression lets you type an expression to use to evaluate the transition. The variables are taken from the node set in the main animationtree expression field. By default animationtree node is selected, you use any of the variables of animationtree node and any variable, export or not in the attached script. I will do a tutorial on this soon, because I see a lot of people struggling with it.

An expression is what you put after an if, like:
velocity.y < 2.0
isAttacking
not isAttacking
not isAttacking and isJumping
etc

So all you have to do is change these variables in the script.

Disfavor answered 13/3, 2024 at 1:42 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.