Generic Animator Setup

Luke

Member
Good Afternoon,

Could you please advise on how to set up a Generic Animator for a quadruped model using the TPC.

I have tried replacing the animations on the demo Animator with no luck. I have also checked I have the correct avatar, right animations for the rig etc.

I have checked the documentation and all they are not very precise on how to do this. I also checked here on the forum before posting, I'm sorry if I did miss a similar post about this.

Thank you for your time :)
 
Unity's retargetting system doesn't support generic animations so it's always more work to setup. I would start by creating a new animator controller and then assigning that animator controller when you create your character with the Character Manager.

After the character manager has completed it will add all of the necessary animator parameters for you. From there you can start to design your own animator based on the parameters. To get started you'll likely want to add an idle and movement state, which you can transition between with the Moving bool parameter. I would keep everything on the base layer until you find a reason to need another layer. I would also disable root motion on the Ultimate Character Locomotion component.
 
Hi Justin,
I have a similar issue with Generic Character Root Motion. Of course before disturbing you I have followed instructions and did what you suggested above. So Idle to walkforward basic. Used Blitz to start and changed walking animation with my character's. Moves, turns etc ok, with some sliding effect on slow speed. Tried both fixed and update timing setups.
In order to tune this i went in the code setting some breakpoints and debug.logs to see and somehow i get the impression that root motion is not applied correctly.

OnAnimatorMove says:
/// Callback from the animator when root motion has updated.


but in it m_AnimatorDeltaPosition.sqrMagnitude and m_AnimatorDeltaRotation ifs are not entered while my character is moving, seems strange to me.

same in the overriden method

when running in CharacterLocomotion.cs I notice that UsingRootMotionPosition is true but AllowRootMotionPosition is false.

i see in code public bool AllowRootMotionPosition { set { m_AllowRootMotionPosition = value; } }

Probably studid question, but also looking at the code and searching in the editor i could not find where to set it. Sorry

of course, if I force it in code things work well



note: I have successfully installed Unity new Input System, following also your instructions on EventSystem. Working well, i just posted warning on the forum for a minor issue.

Great project my friend.

thanks
sergio
 
If you aren't getting any root motion data then you'll want to check two things:

1. Your animation contains root motion data.
2. You are not baking in the root motion data within the animation import settings.
 
If you aren't getting any root motion data then you'll want to check two things:

1. Your animation contains root motion data.
2. You are not baking in the root motion data within the animation import settings.

Sorry Justin, of course i checked that before borhering you.
My point is where/who is chamging AllowRootMotionPosition flag as in the definition is true? I see no reference around. Is it somewhere hidden in the editor and I do not see it?
Anyway, setting it by code everything works really fine.

In the meanwhile I have also adopted cinemachine virtual camera, seems ok for now.
bye
sergio
 
Last edited:
That flag is set under the General tab of the ability. You should also have it enabled on the Ultimate Character Locomotion component.
 
Top