strafe not working, help please

hello, i’m trying to use the model and animation from the shooter sample (the third person skeletal and animations) to prototype a third person rpg action game.

so far, i got the skeletal mesh and the animations imported into the third person template, i have modified the camera to work as a fps game but using the third person template, but my problem is the animation blueprint.

i have duplicated the animation blueprint from the third person template and i’m trying to modify it to work with the new blend space and animations from the shooter game but is not working.

when i test the animation into the animation blueprint changing the values of the variables, the animations work fine, the player walk forward, backwards, strafe left and right, but when i test the game only the run forward animation is played.

i also checked the value that i’m receiving from my pawn and it shows the right value, for each animations, is very weird, don’t know why the animation don’t play in the right way.

here are some pictures of my animation blueprint

blend space

animation blueprint

can some body help me to figure out how to make the animation working in the right way?

thanks in advance for all the help

I have same problem as your but.
Mine one is if you keep look at north, forward backwards and left right animation is correct. But if you look at west, it become left right animation instead of forward backwards… Argh…

In blend blueprint you can change value name eg.
X = -100 and 100
Y= -100 and 100

Idle animation set at middle

Forward should be set at right side most and Right should be set at bottom and going on…

Then that way you can take value out of movement node and string it to set float value.

In animation page. String float value to X and Y blend animation same what you got.

That where I am. At least you got one direction work right, if you follow my way in blend animation…

Need find out right way to do it in local float value instead of world…

thanks for the information, i will try ti fix it with it.

by the way have you tried to uncheck “orient rotation to move” in the CharacterMovement, i uncheck that to remove the turn of the player to the camera’s forward.

i just noticed a weird thing, if i move the camera with the mouse on left or right the pawn begin to strafe, its not strafing right because the left strafe will show when i move to the right and vice versa, but why the direction value is receive from the camera rotate and not from the keys ?

There is great tutorial about how to setup that character.
Follow it.

sorry for the question, but where i can find the that tutorial ?

thanks in advance Nawrot!

Yeah! Where is that? I think I ask Mister Google a wrong question and find nothing in Google…

Cool that I want to add as well! Heh

"“orient rotation to move” in the CharacterMovement, " hm I’ll try that! Ta.

here, also this might be useful

didn’t work for me, i have all the nodes, almost the same, i changed the values that are not the equals and nothing changed, also i used the same formula to get the direction from the tutorial and didn’t work for me, the pawn is always running, never goes idle.

all my animation blueprint is working, just need to get the direction from the key pressed right and left and not from the camera mouse rotation.

i need to change/override something in the c++ sources files ? or there is something that i need to add/remove/change in my animation blueprint ?

I get the impression that your direction variable is not being changed, I would check the editor preferences to make sure that your inputs are set up and the character blueprint to verify that you are actually adding the movement input.

Your character never goes idle because you haven’t built a state machine with the transitions. In the documentation.

my character goes idle with the my original setup, also the direction variable is changing, i checked with a print node and Direction is receiving the input from the pawn.

why the strafe animation are activating when i turn the camera with the mouse and not when i press the left or right buttom ?

Maybe the input in the editor prefs is not set up. Maybe mouse is driving the input?

the player is moved using the keyboard, wsad (forward, backwards, strafe left, strafe right) the camera is moved using the mouse, these two behaviors work fine, i modified the c++ to walk in that way using the rotation of the controller.

if the inputs weren’t setup the pawn didn’t moved at all.

Hey, I went through it. Mine wasnt compiling because it couldnt find a couple of functions. I disconnected the isRunning function (can use a bool for that) and adjusted a few bits. Seems to work:
(Scuse the bad stiching)

i tried calculating the direction in the same way that you did in your Animation Blueprint EricDarkomen, but didn’t work for me. any other ideas ?

hello again, i still have this problem, but just discover that the strafe is activated using the turn rate rotation, but i need to make it working with the press of the “a” or “d” key, is there a link/inheritance to the turn rate rotation with the strafe in the animation blueprint ?

what i need to modify to let the strafe work with the key press and not the turn rate rotation?

Hey Enzoravo, sorry, been busy for a few days. Just to put this into context, I migrated the shooter animBlueprint (with all dependencies) into a blank 3rd person project and re-used the 3rd person controller. I did have to hook a few bits back up (I think mainly in the Character BP but it was a few days ago now) and make some changes to the jump logic to get the character to loop and land correctly but I really just threw a quick proof-of-concept ‘how I would do it’ project together. Seems to strafe fine and aimOffsets are working fine too. Starting at the beginning makes it a much longer conversation so I hope this makes sense.

1d86d0aeed8b53d5ffbf34692eff54d738ffd5ec.jpeg