Please help with anim transition rules

Hi Guys!

I am unable to properly setup the transition rule for [idle to walk to jog], [idle to jog], and [jog to idle]. walk to idle are fine, and idle to walk are fine. I’ve attached my character blueprint function for jog and anim bp as well. There is a character reference variable set in the anim bp that is being used in the transition rule from idle to walk (is falling=true). set max walk speeds @, prone = 20, crouch = 160, walk = 200, jog=375. Can you please provide a transition rule or any advice that would make sense as the ue4 tutorial doesn’t work for me? Is there an issue elsewhere, etc… thank you!

@evilcleric

@Everynone

@ClockworkOcean

This can be better set in an animation blendspace, not in the state machine.

LEt’s say I didn’t want to blendspace idle/walk/jog/ what would be the transitional rules?

You should probably post a picture of your state machine and transition graphs.

At this point Im just working on idle to walk, walk to jog, and both walk and jog back to idle.
I have also crouch and prone but havent gotten there yet.
Please provide any suggestions
@evilcleric

And also animations like stand to crouch, prone to stand

Is there a valid reason why you don’t want to use a blendspace? With four different speed values and three different positions, a 2d blendspace would be perfect for this. Having separate states in a state machine will be a mess since you’ll have to interconnect almost all of them back and forth, something like this:

And setting all the conditions will be hell. Whereas in a 2d blendspace you can have speed as one axis, and position as another (let’s say, 0 for prone, 1 for crouch, 2 for upright), and all animations will be blended between automatically.

I think my bias is just my lack of understanding on how that would look like. If theres two axis, one for speed and one for position, how would that look like? Also how could there be different animations for each position… Crouch backwards, walk sideways, etc.? @tuerer

Okay, I didn’t think about transition animations; automatic blending from prone to stand etc. will probably look bad.

So you can create a 1d blendspace for idle/walk/jog, and set the rest in the state machine. I’d recommend using an Int or Byte (or even a custom Enum not to mix them up?) variable to indicate the position (Stand/Crouch/Prone) instead of using bools for each state, then you’ll only have to read two variables: speed and position.

E.g. when you press Crouch, set Int/Byte to 1, and the transition rule will be: If Position == 1 => Stand to Crouch animation => Crouch animation, and the same with the rest of interconnections.

Id prefer to use 2d blendspaces for everything just to have more control over directional movement. Ill look into that custom enum as thats new for me as well. Just thought bool’s would make sense- for example a stand to crouch variable in my character bp event graph connected to my anim bp event graph (my upload) , why that wouldnt work confuses me. At this point just running a walk/jog works fine and replicates but adding another variable (example: walk jog bs to crouch bs) gets wirey and fails to replicate, even though my character bp’s custom events (input action) are set to replicate.

Sure, you need 2d for direction. As for the bools, they will work alright if you keep track of them properly, but having one variable for mutually exclusive states will ensure that you’ll never have any conflict between the variables. With bools, you’ll have to manually set all five of them for any position change action, and if at some point you set one to true that should be false or vice versa, your animations will break and you’ll have to search where the error is.

You’re a good sport, thanks for the great advice!