Passing Variable from Character Controller to AnimGraph

Hi all,
I’ve been looking at the sidescroller sample and i noticed the animation state machine use speed variable from the charactr movment component.

What i am trying to do is instead, have the player controller get the axis input value and use that in the anim graph to switch between state.

How would i do that ?
I Cannot get the input from the animgraph and i coudn’t pass my variable from my playercontroller to Animgraph.

I still cannot get that to work, anyone can help me ?

The anim graph seems to have no connection to the input setuped in the project properties.
I also tried to get the value from a variable in my playercontroller but i cannot get it :frowning:
Someone can do an exemple ?

Sorry, this question seems to have slipped through the cracks a bit, but have you seen this thread? I think it may help:

You should be able to pass anything from your Character BP to your AnimBP using the method above. So, you could feed your axis input value into a variable in your Character BP and then pass that info to the AnimBP.

Good luck!

It worked ! thank you !

Similar issue with inputs, The link above is right but I still had issues where the animation wouldn’t play (since fixed it), so just as an FYI to anyone who winds up here later, if you’re using animation on a skeletal mesh it doesn’t seem to work well when it’s an actor class, recreating it as a pawn fixed a lot for me.

For objects that are not Pawns you use the ‘GetOwningActor’ instead of ‘TryGetPawnOwner’ inside the animation instance.