x

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"

AnimGraph Arrow Help

How can I set the arrows up so that these state machines all function through WASD movement controls?

How can I setup the arrows between [Idle/Run] to [From Stand] and [To Jog] ?

For example, if [To Jog 90L] was not a stop animation, but rather the beginning of an animation specific to jogging left 90 degrees from stand?

i.e. how to program a WASD movement direction to trigger jogging in 90 or rather 45 degree directions?

Product Version: UE 4.11
Tags:
more ▼

asked Aug 18 '16 at 01:06 AM in Blueprint Scripting

avatar image

gogogad
8 7 14 17

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

1 answer: sort voted first

i would recommend blending animations to achieve running in all directions, rather than using multiple states in a AnimationStateMachine, this can all be done inside the IdleRun state. with a 2D blendspace:

https://www.youtube.com/watch?v=SgsYsViIRYE&feature=youtu.be&t=10m35s

more ▼

answered Aug 18 '16 at 02:35 AM

avatar image

ScottSpadea
9.6k 320 205 450

avatar image gogogad Aug 18 '16 at 02:40 AM

But what if I have animations for forward, back, left and right

but there are more animations for stumbling or hitting W then D then W etc.?

How can I set it up in the same blendspace and trigger those animations to blend only when the right combination of WASD is hit?

Because if I just have forward, back left and right it will not have the same effect as more adaptive?

avatar image ScottSpadea Aug 18 '16 at 03:13 AM

Stumbling can be a separate state from WalkRun. it can have its own blendspace based on angle and speed, just like WalkRun's 2D blendspace.

avatar image gogogad Aug 18 '16 at 03:17 AM

Yes so basically if you tap WAS or D you will stumble because you did not actually want to hold the button down to travel, like a false step.

If you hold it down it will travel in that direction but facing forward holding S to go backward might have a different turn animation than that of facing left or facing forward-left (by 45 degrees)

All angles have a way to turn, a way to move, a way to stutter and a way to jump.

What is best way of implementing all of these?

How can I actually get the angle and state if the button is tapped or being held down, etc?

avatar image ScottSpadea Aug 18 '16 at 03:36 AM

watch that video i posted a link to, it will explain how to get the angle and speed of the charater and change the state machine based on a boolean so it goes into the combat state. but instead of combat, you just name the state Stumbling.

and detecting the button being tapped or held down is unrelated to the animation system, you should handle that in the player controller or pawn, or some other actor, wherever you are getting input. you just check when the button is released, how much game time has elapsed since the button was pressed.

(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