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"

Make player stop moving after landing?

I've read numerous examples of how to apply force to a character, stop their movement, etc. None of the blueprints work for what I'm trying to do. I've tried them all, & tried making my own, no success. :(

Let me explain: My character's "landing" animation makes him pause for about a short moment, then resume the "run" animation after the landing recovery.

The default 3rd person character controller, by default, does not take into account any sort of "landing recovery." It just continues allowing movement with full velocity after a jump, no slowdown or pause whatsoever.

Unfortunately, the "recovery pause" I've made in my character's Animation Blueprint does not apply to his actual acceleration/velocity, so even though is animation looks "paused" the character can still move around. Essentially he's sliding over the ground after landing. His feet are not moving (as he's recovering from the jump) but his body continues to move forward anyway. It looks very strange and I can't progress forward until I figure this out.

The part of the "recovery" animation where the feet touch the ground occurs at the animation's 36% duration point. I've tried using adding nodes in the Animation Blueprint to detect this duration, and then use the "Stop Player Movement" node once it's detected. This never seems to take any effect though. I'm starting to suspect player movement can not be changed via an Animation Blueprint - is that correct?

I can add a similar setup to the character blueprint instead, but that blueprint does not give me access to the "recovery" animation's "duration" node. So I have no way of timing the stop/start of character movement with it.

Thank you very much for the help, sorry if my explanation was a bit confusing. I'm not a coder, just a visuals guy, so this stuff really stumps me.

Product Version: Not Selected
Tags:
more ▼

asked Apr 11 '14 at 09:29 PM in Blueprint Scripting

avatar image

pvalencia
46 3 6 9

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

3 answers: sort voted first

Disclaimer: I'm an animator and even to me this seems hacky :), but it seems to work. I'm sure someone will post a much cleaner, better solution, but for now, here goes....

First, I added two anim notifies to my landing animation. One called StopMoving where the feet hit the ground and one called StartMoving at the end of the anim to allow the character to get going again. When StopMoving fires, I set the MaxWalkSpeed to 0. Then, when StartMoving fires, I set the MaxWalkSpeed back to it's normal value. What my eventGraph looks like:

alt text

Note that I'm storing the default MaxWalkSpeed in a variable at the top when the animation initializes and then using that variable to reset the MaxWalkSpeed after the anim finishes.

Hope that helps!

more ▼

answered Apr 11 '14 at 10:06 PM

avatar image

Ray Arnett STAFF
1.4k 45 17 71

avatar image GregBlast Apr 11 '14 at 10:11 PM

I was not too sure if he wanted to stop player input or change the speed even without any input. So I posted mine about stopping player input below.

avatar image Ray Arnett STAFF Apr 12 '14 at 07:38 PM

Nice Greg! I didn't see your method when I posted my answer. I wouldn't have even thought of stopping the motion at the user input. I'm learning so much just looking at how everyone is tackling these problems. Keep at it!

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

Hi,

I don't know how to get the time from the animation because I don't really know how to use that. But I can tell you how to achieve this in blueprint if you can specify the recovery time yourself.

Edit your character blueprint. Add 3 variables to it: - CanMove (boolean) - RecoveryTime (float) - RecoveryElapsed (float)

Add an EventTick event and plug it to the following node graph: alt text This will basically: - check if player is recovering (CanMove = false) - add the time elapsed since last frame to the total time recovered - if the time waited gets above the RecoveryTime it will reset CanMove to true to let the player move again

Now to stop your character from moving modify your movement input sections to first check that CanMove is true before changing player's position: alt text Do that for movements and jump too and any input you want to block.

Now the only thing missing is to actually tell the player to stop moving when he lands. So add an Event On Landed node and from it set the CanMove variable to false: http://puu.sh/84YE7.jpg

That's it :)

more ▼

answered Apr 11 '14 at 10:05 PM

avatar image

GregBlast
151 7 12 23

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

I've just found out about three nodes which may help you - Set Ignore Move Input, Set Ignore Look Input and Reset Ignore Input Flags (I work in 4.8.3). You will find screenshot in the topic below:

https://answers.unrealengine.com/questions/248709/how-can-i-trigger-a-camera-with-bp-switch.html https://answers.unrealengine.com/storage/temp/53035-ue4_cameratest_2.png

PS Sorry, I didn't notice it's such an old topic.

more ▼

answered Aug 06 '15 at 02:27 PM

avatar image

Nox_A15
309 19 138 194

(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