I’m working on a small online RPG.
Until now I’ve been using only models with legacy animations but I just bought a character pack with a mecanim animation controller. The animations are made for root animation.
I’ve always thought that root animation wasn’t for me because I’m performing all logic on the server (not using Unity) with a greatly simplified spatial model and just sending movement vectors to the client, which will then move the entities around at a constant speed. I can’t have animation driving my locomotion since my locomotion should be driven by the logic which is in turn dictated by the server - with animation just being part of how my logic model is being rendered.
Now I’m starting to think that I might be mistaken after all? If I know the average velocity of the root motion of say - a run animation - then I could probably just set the speed of the animation state to have the average root velocity match my desired velocity. I’m just not quite sure how I would detect and deal with the inevitable situation of my run animation being stopped in a place where the root translation is either ahead of - or lags behind - the logical position.
Has anyone tried something similar? Or should I just stick with in-place animation?
Or is there perhaps a way to bake not the translation, but rather the difference between the average translation and the current translation into the pose?
This doesn’t answer the question you asked but I think its an important point to use the method you are most comfortable with. To me (as an animator) I prefer to use root motion because I ‘see’ things moving in space, and I also like the fact the IK ‘just works’ like it should with the feet and hands when using root motion for animations.
I’ve not worked on a networked game before, so that may modify my thinking in the future when I eventually have to consider the send/receive lag associated with networked games.
With all that said - I’ve worked on about a dozen indie titles for other folks and the majority of requests are to deliver in-place animations for final assets.