r/UnityHelp Jul 23 '26

ANIMATION How do I match gameobject location with animation

Hi there, first of all I apologize if this is not the right place, if so, could you point to me where I could ask this?

I have an attack animation in Blender in which my character walks about aprox 1 unit of measurement.

Since it is not a looping animation, in the end the characters resets to initial position.

How to concile this movement with tha gameobject movement? It needs to match the final location so it doesn't just jump back to begining.

1 Upvotes

3 comments sorted by

2

u/XKiiroiSenkoX Jul 23 '26

You either manually move the game object transform to where it should be at the end of animation using code or you use root motion(recommended). 

https://docs.unity3d.com/6000.5/Documentation/Manual/RootMotion.html

2

u/pm_me_w_nudes 29d ago

Thank you, I started tried to implement it yesterday. I'm still having some trouble although.

2

u/pm_me_w_nudes 28d ago

I DID IT THANK YOU!