Noob Anim question: player steps back... do I need to reset actor location?

Up until now… I’ve been using “inplace” animations but would like to do more advance stuff showing the player getting knocked back when hit, etc.

For example… I’m using an animation showing the player to getting hit and taking a few steps back.

Of course once the animation is over the character slides back to the actors location.(because the actor hasnt really been moved - just the animation shows it moved)

I am guessing I am supposed to do a “set actor location” at the end of the animation? (moving character to where ever the animation showed the player stepping back to)

Do I do a “set actor location” where ever the “mesh” is located at end of step back animation (using mesh world location vector possibly?) Or do I somehow use offsets, etc.

Basically a Noob and was wondering if there’s any trick or tutorial showing the best way to do all of this since playing around so far isn’t looking seemless and perfect.

Thanks

Just change the animation to a root animation and the position of the end point will be preserved for you without any need for housekeeping.

If you really want to do it manually, for science, because it will never be 100%accurate.
you can add a notify to the animation or state machine end, and from that get the socket location of pelvis - the bone - to place the root bone at the X and Y world location of said bone.

For Z you have to do math. Something like:

capsule location half height + z position (roughly around the pelvis) - final pelvis location z.
then the opposite.
result - capsule half height = final z

If the pelvis is off you’ll dip your character under the landscape, so this isn’t a very good idea compared to just enabling root motion and letting it do its thing.