I would like to ask you what is best way to swicth between differents poses in an animation blueprint.
I have a umg and i get slots index from it. For each clicked slot, this index fires a specific animation sequence.
For now I’m using a state machine, with for each state a condition would say : “if index = x, so it’s true”. It’s work well but I have about 20 animations to write inside and the transition rule management becomes a hell since I have to write a back and forth rule for each state, connected to each others. By the way, the “bidirectionnal chekbox” in transition details isn’t implemented yet (I use 4.23), what could have helped me a little.
I also tried to use a blend space, but I didn’t find any way to switch from one index to another without passing trought all animations I have in the timeline.
In fact, whether PoseAsset or AnimMonatage etc. , I can’t find a proper way to trig an animation choosed randomly in a collection according to an integer index.
What I understand, is to implement all of that as a state in a state machine, right? Something like this where I get my anim variable to tell state wich animation to play, according to what I set in that anim variable (new var 0 on my screen).
Blending can be handled independantly in many ways - this does not affect your ability to blend at all.
For example, you could toggle between two animation variables when you switch and easily blend. (see below). When you select a new state, toggle and blend to the new variable.
Or you could blend from some other state in the animgraph - eg idle pose
The point of this approach is to avoid hardwiring a large number of animations in your graph. Nothing stops you from hardwiring if you want.
Pity to not have a “real” system to achieve this, and to have to use this kind of workaround…
The only setting we have to manage transition is just a linear interpolation between anim sequences!
What you want is a state machine in which you govern the active state based on a single integer/float variable. you can transition to the state IF the conditions are met.
The best conditions for this would be
1 boolean, 1 Float/int == value
You can return to the idle state as you see fit - possibly the best approach is to remove Loop from the animation and enable the automatic return checkbox.
Yes, each state needs to be created and have both input and return created.
The thing is that if you set it correctly you can literally just copy and paste the enter rule and change the value.
As stated, return can be as simple as 2 checkbox clicks.
Hi MostHost
That’s exactly what I did. But the process of dragging an input/return connection for each state is time consuming, and becomes quite complex with a lot of state.
Technically (and theoretically more than technically), can you not create an automation tool in Python that does the connections (copy pastes) for you?
if you need to do this on 20 characters and you have 20 such states it would be worth the time invested into creating a specific tool…