Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: Not Selected
more ▼

asked Apr 20 '14 at 07:10 PM in Blueprint Scripting

avatar image

11 3 6 8

avatar image heboltz3 Apr 21 '14 at 05:13 PM

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 :D

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

4 answers: sort voted first

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)

more ▼

answered Apr 21 '14 at 10:57 AM

avatar image

178 9 8 13

avatar image heboltz3 Apr 21 '14 at 10:36 PM

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?

avatar image Geodav Apr 22 '14 at 04:11 PM

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 ;)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

alt text

more ▼

answered Jun 08 '14 at 05:49 AM

avatar image

1.1k 46 47 87

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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

alt text

blendspace.png (43.8 kB)
more ▼

answered Apr 22 '14 at 01:54 AM

avatar image

Duncan Dam
3.1k 121 50 164

avatar image heboltz3 Apr 22 '14 at 04:44 PM

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.

alt text

eventgraph.png (171.4 kB)
avatar image heboltz3 Apr 22 '14 at 04:45 PM

Oh, and My CharacterBP

alt text

avatar image regretsph Nov 18 '15 at 12:12 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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): https://answers.unrealengine.com/questions/32458/third-person-preset-blueprint-strafing-animation.html

This is a duplicate post: https://answers.unrealengine.com/questions/197379/leftright-strafe-animations.html#answer-476670

more ▼

answered Aug 27 '16 at 06:51 AM

avatar image

3 4 7 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question