Okay, I imported an animation and skeleton into UE4, but I was unable to get it to perform the animation when pressing a certain key. I set up G as key input and created a variable ShouldPlay in the character BP.
In the animation BP I created the update animation, try pawn, cast to mycharacter, and so on…but when I hit PLAY and press G it doesn’t play the animation.
Take a look at this tutorials: ? It will answer all your questions
Or do it like that:
in the “my character bp” you have to add a bool variable which will be activated/deactivated by a input
in the animbp you have to cast to your character - then create another variable in the anim bp - get the variable from the “my character bp” and connect it with the set node from the bool variable in the animbp
go into the anim graph and set it up like on the picture -> so in the state you have to add the animation - the link to the state should just have the variable - the link to the idle state needs a variable + not
Okay I knew how to do all that except the animation graph and state machine thing. I however don’t have an animation montage. I only have ONE animation I’m trying to test and see if it works.
What do I do in the animation graph? I dragged and dropped the green file sequence and connected it to the final animation pose.
Here we go: ?v=pLUHwVTRhCs&feature=youtu.be -> I think it should also be possible with a “play montage” in the character bp, but I prefere this way (because I use different animation modes -> friendly, one hand weapon, …)
Thank you it helps, but I still can’t get it to work.
Do I need to have an idle animation in the idle state? I connected an Idle state and TestAnimation state to each other, but I currently have no idle animation connected to final pose in the Idle state. If that’s confusing here is what it looks like for me:
Hey , This really helped me out, thanks a lot! I have 2 questions… I am setting up a DOTA style attack, where say Q,W,E, are the attack keys. I set up the first one like your example. Great stuff, worked perfect.
Is there a way to let with key press, to let the animation finish. The way this is set up, when you release, the animation stops immediately.
Setting this up through the sequence node, does it matter what slot this goes into or is there a different node that would work better.
I know this thread is old , but I have same question of poster above. How do you set it so just pressing the button plays the whole animation once? The way it is with press to activate animation and release to stop it, you have to hold the button to go through the animation, the second you let go of the button , the animation stops.Otherwise if you remove the release pin connection , he keeps looping through the animation and don’t stop.