I’ve been following the tutorial series on how to create a third person animation system in Unreal 4 - YouTube. Its a great series but I’ve become really stuck and was wondering if anyone might be able to help me out?! I’m an animator in the games industry but I’m new to unreal.
I’ve followed up to video 14 where the system is tested for the first time. When I run the game I can orbit the camera with the mouse but none of the keyboard controls move the character. I created the blend spaces and they seem to work ok when I manually set values. I created the animation blueprint with all of the logic to initiate and stop the walk (no jumps yet, just using my own mocap for a mini traversal system). I have created the character blueprint, added the skeletal mesh to the mesh component and told it to use my animation blueprint. I set up my input axes as in the vids. I set my default pawn class in my world settings to my character blueprint. I set up the MyGame blueprint as in the vid too. Obviously I’m missing or have done something wrong somewhere along the line but I was scratching my head for a good few hours yesterday and totally hit a wall with it
I’ve uploaded my project to my google drive, if anyone has time to have a quick look to see if you can tell where i’m going wrong it’d be a massive help.
Took a quick look and what jumps out is it’s not a good idea to mix blend spaces inside of a state machine as they work best with “blend by” with in migration path of the main animgraph and use action mappings and not axis mappings.
With in the state machine the actual animation clip has to be used to be able to sample the current % to end of that clip which you can’t really do that effectively if it’s wrapped inside of blend space.
This is a behind the scene dev video (me talking to the coders) of how “our” animation migration will work if a key is pressed that might help you out.
Thanks for the reply Frankie, I had a look at the vid but I’ve only been working in UE for a few days so it seems a little too in depth for my current level of understanding unfortunately, it seems like there’s a lot of useful info in there though so I’ll keep it handy for reference as I progress.
So as far as I can tell the blendspaces and the way they work together in the state machine seem to work well (aside from a few root motion issues). When I test it in the Anim Preview Editor by keying in values to my variables I get the behaviour I’m expecting. The problem comes when I come to play the level to test the system using input devices. I have the WASD keys, the arrow keys and a game pad set up to control the traversal but none of them seem to affect the character. Is there a way that I can debug whether or not my controls are feeding the correct values through to the system? That would give me a clue as to where the problem might be. Can I display the variables that control my AnimGraph when I play the level?
Depending on which version of Unreal you are using, you might want to try Unreal’s new Third Person Game series by Wes Bunn. You are watching Zak’s series which is for 4.7 and before. Wes’ is for 4.8, and only came out last week.
So I’ve watched the new tutorial series up to video 14 and compared the video to my project at each stage and everything seems fine. All of my settings and blueprints look ok as far as I can tell. I’m going to restart my project to see if I have any luck with that.
I’ve run through the new series with a new project but I have exactly the same issue. I am thinking that the problem is rooted in the fact that I have been following using my own animation with a slightly different set up in the state machine. Instead of using the jump to trigger the jump take off state, I am using speed to trigger an idle to walk animation. My condition to go from the idle state to the idle to walk state is speed > 0.01. Below is my anim event graph. As you can see my movement component is unlinked, this is because I didn’t need to query whether or not the character was in the air. However I have linked up the speed variable. I’m guessing at the moment that my speed is not linked properly at some stage. Could someone help me understand where I should look next to ensure this speed variable is hooked up correctly. Having to shoot off to work now so I’ll investigate further later but just wondered if anyone could offer any insight in the meantime. Thanks!
Do you have a picture of your blendspace graph, and your input project settings?
Also, to debug your code, is the isValid valid? When you press a button, does the Event Blueprint Update Animation event fire? And where does it stop firing? (If you don’t know how to check this, just run the level, and try moving your character around, while being able to see the blueprint you posted above).
P.S. It’s always worth printing the string “IsValid is not valid” or whatever, in the event of a check, so you can see the outcome for debugging.
The screenshots include the blendspace graph for the idle to walk animation (the idle state is just a looping animation), the statemachine, my project settings, my character blueprint event graph.
What do you think might be causing my pawn not to be valid?! Is it a problem that my movement inputs go from -1 to 1 and my blendspaces go from 0 - 100?? I also just tried jumping with spacebar and he sprang up kicking the idle to walk animation off. He then carries on walking till he falls off the edge of the world
So I’m pretty sure my problem is to do with the Try Get Pawn Owner not being valid. Has anyone got any ideas what could be causing this? Its really blocking progress
I did yeah, and it spams “IsValid is not valid” when i run the game Also when i hover over the try get pawn owners return value when simulating the little readout says “none”. So that definitely seems to be the issue.
Not sure any more that the try get pawn owner is the problem I just opened the third person example scene and that works ok despite the fact that the get pawn owner returns none on that too. I’ve been tweaking various settings to see if I can get any clue as to what is going on. I tried changing the root motion setting in the anim blueprint and I got some animation coming through. So for some reason when I set this to Root Motion from Everything all animation, (inc. any capsule movement) is switched off, i.e. no walk cycle animation on the actor and no translation of the actor through the level. Could there be something wrong with my root? I fairly sure its animated right.