- Home /
Best way to sync animation and movement?
I am relatively new to Unity - I have used it the past couple summers for research at my university, and so I'm not sure if this topic is over my head, or if there is a (relatively) simple way to implement animation/movement synchronization on a character. I have done a fair share of research and haven't found anything too groundbreaking, but maybe I just don't know what to search for.
I created a solution that works, but will not work for physics/collision calculations. The basic algorithm for my walk animation sync (the animation has no root transformation) is to update the position of the character so that whichever foot is on the ground has its bone position remain constant while the character moves essentially the negative Vector3 of the Vector3 which the bone is moving.
This solution is very simple, but I know that once the character begins moving into walls, things will get complicated. Would an appropriate solution be to simply Raycast to prevent the character moving into/through objects, or am I completely on the wrong track with this?
Thanks a lot!
-Paul
the new mecanim component is good allows for you to test in script then send that info into the animator to match what you are looking for I read at one point that they had it checking a wal for climbing and a animation that appeared to climb it. the manual has a lot more info that maybe where you wanna start.
Answer by thenickhis · Apr 16, 2015 at 05:20 AM
This is worth a look: http://docs.unity3d.com/Manual/animeditor-AnimationCurves.html You can use it change your animator's parameters in correspondence with the current state and access the parameters via script.
Your answer
Follow this Question
Related Questions
Mecanim: 2D Blend Trees, Unable to Compute Positions. 0 Answers
Mixamo strafing animation moving slightly on the Z-Axis 0 Answers
Why is root motion reduced once I apply the animation? 0 Answers
Animating a non-humanoid for root motion? 1 Answer
Player Is Not Facing Right/Left When Root Motion Is Enabled 0 Answers