I would like to have a set of animations (montages and blendspaces) that would control my character. Instead of hardcoding animations in animBP, I’m hoping to use animations from variables. However I have not had luck yet. I would love to use animBP as it contains very powerful tools for blending animations.
Lower body animations (idle/walk/run and crouching) stored in 2 properties of the character
So no-one has tried on dynamically setting the used animation in anim BP? Or is it just plain impossible?
Does anyone know what type of object the editor uses when it shows dragged blendspace in the anim BP? I have started on looking to editor source, but it’s most likely too long road to follow… At runtime it should make no difference what animation sequences it evaluates as long as they match to same skeleton?
Actually I think it’s possible. According to your screenshot, I think you should cast your character blueprint in the event graph instead of the anim graph.
For my game, I use the EventGraph from the animBP to get all the variables and let the AnimGraph uses it. For example, I use the EventGraph to get 2 variables (forward and side), and then use those 2 variables in the AnimGraph.
Hi and thanks from your example. For me it looks like that you have pulled only variables containing input values for a blendspace. I’m actually trying to get the blendspace (or other animations) itself from a variable.
I was looking more into the editor and I will try to create my own editor node(s) with the instructions given here A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums . A node that would extend the existing blendspace, animation montage and so on, but they would read the animation dynamically at runtime (and have a predefined one for editor).
Found a solution to this. You can grab a blendspace into anim graph and the from its properties you can show the blendspace as a input which you can pin the input you want. Cheers!
While this is quite an old question I just stumbled over this myself and this was the solution. So in your locomotion graph of one of your states just drag any Animation sequenze you already have in it and link it up to the Result “block”. Then click on the Sequenze block you dragged in and look at the settings ( bottom right of the window). Here you can then check the checkbox of the first first property called “(As Pin) Sequenze” to make it show up as a pin in the graph. Now just hook up your animation Sequenze variable to it.
When would one set the “current idle anim” var though? in a setup where you have potentially endless weapons and you can switch between them at runtime (and the individual animations are associated with the weapon obj), i found that you have to set the vars inside the anim blueprint on tick or on begin play. i cant set it once inside my controller or even pawn once i switch the weapon. Is there a more elegant solution to this problem?
Create a Data table called Weapon DB. This will have all the details regarding the weapon, such as bullet speed, bullet damage, Idle animation etc.
Create a function called SetCurrentIdleAnim in your animation blueprint.
When you call your switch weapon function, grab the animation associated along with the weapon (From the data table) and pass it to SetCurrentIdleAnim.
By doing this, you send the current idle animation everytime you switch the weapon instead of polling it in a tick function.
oh yes the event based approach works as well. My problem was the multiplayer part. If anyone has the same issue: The server can’t change the client’s animation! its always a netcode problem, makes life so much worse
thx
Holy smokes, this is EXACTLY what I was looking for and so I’m adding this comment to increase it’s visibility in any way I can. Thanks, you’re epic, don’t ever let anyone tell you otherwise
If you can’t find the “Play Animation Sequence” Node you can use the “Sequence Player” Node and in the details panel go to Settings > Sequence > Bind and click the “Expose as Pin” option