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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Root motion seen by Unreal, but not applied

Hi everyone!

So, I've been searching around a lot, and in fact, this is a problem I seem to have every time I work with Unreal. (Probably mostly because I forget what the solution was.)

I'm trying to apply root motion to an animated creature in my game. The root bone and everything appears to be correct, because the root motion is cancelled out when I select Root Motion, i.e. there is no "snapping" effect. However, the motion is not then reapplied to the creature. This is exactly the same as if I play the animation in preview mode with "Process Root Motion" turned off. On a turning animation, the creature does not turn at all, but instead plays a nice smooth animation of stepping in place.

alt text

This seems to be the exact same problem as this post from 2004: https://answers.unrealengine.com/questions/64893/root-motion-not-being-reapplied-to-capsule.html

Unfortunately, that post was never answered, so I'm still in the dark. Any thoughts?

Product Version: Not Selected
Tags:
dino_rootmotion.png (199.4 kB)
more ▼

asked May 13 '15 at 05:54 AM in Using UE4

avatar image

Trekopep
13 3 6 9

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

1 answer: sort voted first

Try inherit ACharacter for your creature class. Root motion feature has effect only when you are using CharacterMovementComponent. It'll work if you enable tick of CharacterMovementComponent.

more ▼

answered May 13 '15 at 07:27 AM

avatar image

STEIN84
43 5 9 10

avatar image Trekopep May 13 '15 at 05:47 PM

Could you be a bit more specific? I'm still learning the ropes of Unreal.

I'm assuming inheritance is done via the C++ code. How would I go about accessing that? How do I make the creature use CharacterMovementComponent? What exactly is the "tick of CharacterMovementComponent", and how do I enable it?

avatar image STEIN84 May 14 '15 at 01:28 AM

You could inherit classes via Blueprints as you want. Open your BP and select 'Class Settings' from the menu above. You'll see 'Parent Class' in details panel. Change it to 'Character' and recompile, then your BP class will inherit Character class. Character class instance has a CharacterMovementComponent as default sub component. Get a reference to CharacterMovementComponent of your BP character and call 'SetMovementMode' function. Setting it to 'walking' will make it work for you

avatar image Trekopep May 14 '15 at 05:46 PM

Hi Stein84,

So I set my creature's parent to Character. I tried setting the movement mode to Walking in the creature's Blueprint Event Graph, but it didn't seem to be working. I tried using a print statement, and that didn't print out anything either, so it seemed like it was just not executing the event graph.

HOWEVER, Unreal crashed, and I lost my creatureBP, so I created it again, did what I thought was the same thing, and now it's working. So I'm at a bit of a loss. But it works, so that's good enough for me for the time being.

Here's the picture of my event graph before it crashed (which is the same as it looks now). alt text

Confusion aside, thanks for the help!

blueprinttick.png (52.1 kB)
avatar image STEIN84 May 17 '15 at 11:00 AM

Glad to hear it works Trekopep. I don't see any reason to crash in the screenshot. But the tip is that it is enough to call setting movement mode just once. Just for efficiency :)

(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