0
\$\begingroup\$

I've been testing/exploring character movement with root motion in Unreal. I've modelled a simple character in Blender, animated a walk cycle with root motion, and in the end I've got the desired result - movement seemed to work and look just as it should. But in the process I've noticed a little detail.

For adding the root motion itself, I've followed a tutorial by Mark Masters, a professional game animator, so the root motion in my animation (as well as Mark's) starts a bit behind the world origin and then moves forward beyond it. In Unreal it looks like this (here character moves from left to right):

enter image description here enter image description here

But I've noticed that in the vast majority of the tutorials related to setting up the movement system (and in Unreal docs as well), the root motion starts exactly from the world origin, not behind it (i.e. in those animations in Unreal the red line looks like in the second picture from the very start).

My question is: does it matter/have any consequences down the line (in Unreal/gamedev implementation in general) if the root motion starts anywhere outside the world origin? Thanks!

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

Root motion is based on the objects' world origin.

It is important to note that the object does not move, only the Skeletal Mesh component.

The Get Actor Position will return its spawn location, not the current location. Get the world position of the Skeletal Mesh component of the actor instead.

The same thing happens when physics is turned on on a static mesh component that is not the root component.

\$\endgroup\$
2
  • \$\begingroup\$ Thank you for the answer! But I can't seem to fully understand it in relation to my question. I'm sorry, I may lack some knowledge of the Unreal terminology. What I meant is: some root animations start outside the origin (you can see it in the pictures above - at the 1st frame the red line points one way to the origin, but later it points the other), and other root animations start exactly at origin (at the first frame the root position is the same as origin's). So I wanted to know if this difference matters at all (for blending or anything else down the line)? \$\endgroup\$
    – Vanetchka
    Dec 17, 2023 at 10:20
  • \$\begingroup\$ @Vanetchka Just as long as only one animation has root motion, other movement animations(i.e. relative) will blend naturally. \$\endgroup\$
    – agone
    Feb 4 at 23:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .