So, I have a relatively complex node system created in the Level BP that captures and updates temperatures from various locations to obtain a global mean for a given territory.
The result of the mean is a float value.
Then, I have poses in a Blenspace that I want to use from the Animgraph.
In the AnimGraph, depending on a value (here ‘Temp_var’) between -10 and 10, the corresponding pose is called from Blendspace.
And here comes my struggle: I want to send the float value of the mean temperature from the Level BP in the Animgraph to plug it in the ‘Temp_var’.
Basically, that the mean temperature influence the animations of my model.
… and I just can’t seem to comprehend how to perform such a – seemingly simple – task.
After days of looking at tutorials and documentations on Interface and Cast I surrender.
I think I somehow got the logic behind casting but I don’t understand how one can reference something (in this case a float) from the Level BP and call it from another BP (in my case, an AnimBP, and inside this AnimBP, in the Animgraph).
I gather it wasn’t the smartest to set up my initial node system in Level BP, so possibly I can rework it as another BP type, if required.
Although, it would be nice to know if it is at all possible to work this out from the Level BP.
Any hints welcome!
Surely the solution is right before my eyes but I can’t seem to perceive it!
Thank you for your answers!
I think I understand the logic of your first solution.
Although, in the Level BP, I am not able to target ‘My Gamemode Variable’.
I tried it in an actor BP and the setup works. I am able to target ‘my gamemode Variable’ properly.
The issue is then that my whole node setup doesn’t work anymore in this actor BP.
I am getting temperature data through an OpenWeather pluggin and I wonder if that only works in Level BP? I am scratching my head on why though…
How did you managed to target your ‘My gamemode Variable’ from the Level BP?
Hey, so I got it to work and call the temp_var inside the the anim_graph.
It works, although I now have a warning as apparently getting the ‘get gamemode’ inside a animgraph is ‘thread unsafe’.
Haven’t yet comprehended the solution proposed by Unreal, but at least I am starting to get my head around the process of calling and communicating between BP.