How can I use Blueprints to create a strafing animation?

Hello world!

First post on the UE4 community, and I’m happy to be here.

So I’m working on a locomotion package for UE4, and I want to basically backwards engineer the ThirdPerson preset to include strafing animations. Binding these to the Q and E would be optimal, but I’m not even sure where to start with this!

Any help would be extremely appreciated, as I am really new to Blueprint and UE4 for that matter, thanks guys!

PS. I can provide pictures of my blueprints, but they are identical to the TPP defaults.

ok i’d advise you have a look at the shooter game demo, in there there’s an example of the 3rd person which then uses a blendspace2d to blend between forward/backward & left/right running anims.

you’ll also find more on the controlls.
ps you might want to check the fps template (pick and mix)

B-e-a-utiful! Thanks for the advice Geodav.

I was able to get strafing working, but it’s a very hacky approach that utilizes both Keypresses InputAxis controls. It was enough to get visualization of the feel, but I definitely want to do it “The Correct Way” so I’ll check out the other packs for reference :smiley:

Another Question on the subject.

It seems the TPP uses Velocity to blend from Idle to Walk and eventually to Run in the default setup.

If one was to try to achieve the same with a full blendspace but with strafing, what do you imagine they would use with Strafe?

For my project i use velocity only from my character, and convert it’s to Forward and Right value, the strafe it will be on X-Axis

4571-blendspace.png

i personnally use a copy of the shooter game blendscape which works well for me using direction and speed, these are set in the event graph of the character animblueprint.

but as you can see blow there’s many ways to skin a cat :wink:

So I’ll attach my EventGraph and Character BP just for clarification.

Right now I am “double calling” the Q/E press. Once on the “InputAxis Strafe” command which physically moves the character through space, and again on the “Q” keypress under Anim Trigger. This triggers the animation to play over time. This is a redundant setup, and I am wondering what is the best practice for doing this correctly. I’m trying to keep the format as similar to the TPP as I possibly can for flexibility sake down the pipeline.

Thanks for all the help so far guys, I feel like I am slowly getting there.

Oh, and My CharacterBP

Using yourCharacter from MyCharacter in the ThirdPerson project template, assigned in yourGameMode.
Be sure to cast to yourPlayController from BeginPlay and call EnableInput.

This works relative to the current facing direction.
In the example, you could unhook the == output of both Compare Floats to stop sliding on the ground when the character is not actually running, though I kind of like the surfing look so I included two speeds. You could setup a ‘shuffle’ animation to play I guess.
When the velocity is greater than 0, the running strafe works just fine. Values could be tweaked I guess, but it seems to do the job. It still gives a little forward motion, which I think is better than pure running sideways.
The key input is running forward or backward while holding comma or fullstop. Note that if you are using some kind of cinematic mode, these keys are not locked off by that (like the other motion input).

BTW - I just noticed that the direction of comma and fullstop would make sense being swapped round for left/right.

Did you found it? can you share it to me pls. :slight_smile:

Uh, these answers are good, but they only shed light on the solution. I.e @Duncan Dam this solution is literally just a picture… albeit a good blend-space implementation, however not answering the question in its entirety.

To get to the point (this guy hits the nail on the head):

This is a duplicate post: Left/Right Strafe Animations - Character & Animation - Unreal Engine Forums