[Noob Question] Character BP Float Variable to Animation Blueprint.

Hi all!

I’m trying to get the value of a generated float variable (how long a key is pressed) to the anim Graph what is used for the character. but I don’t get it to work.
If I’m using a editable variable I cant ad a target to it.
Also tried a Blueprint interface, but nothing happens and I get no errors. (maybe missing or wrong target)

I need the variable to change the “scale” of some bones.

I cant post pictures now, I’m at work and bored. :eek:

Hey and welcome.

Inside of your AnimationBlueprint, you should have an EventGraph. In there, by default, you’ll see some kind of Tick function and a node called “TryGetPawnOwner” (don’t know the exact name).
You would now create a FloatVariable INSIDE of the AnimationBlueprint. Then cast the “TryGetPawnOwner” to the Class of your Character and access the Variable there (Get it).
After that you can save the variable that you got from your character in the variable you created in the AnimBlueprint. That AnimBP Variable can then be used in your State Machine to change a bone.

Make sure that the Character has the AnimBlueprint actually selected on his SkeletalMesh.

Thanks for the fast answer, I will try it at home.
Your name sounds familiar, maybe from a old german mapping board?

Ok, I don’t get it to work.

Char BP:
ca36a019abfad498f0ad31523ae019ac2b399277.jpeg

Anim BP:
e7d0d1fcdafed2f48eb0cc570bd821ac4dee9354.jpeg

Similar to exi’s Answer, I suggest to use the Initialization Event in the AnimBlueprint.
In this Event, use the Cast-Node just like you did, but save the Result in a variable in your AnimBlueprint.
This way you can easily access the variables without saving all variables separately in your anim blueprint.


You can then use all your characters variables directly.

And how to get the Float value from my char bp to the anim bp?

Edit: Got it working:

simply drag a pin of your character variable and then search for “get NAMEOFYOURVARIABLE”