Animator fix my gameobject on the screen

Hi all,

On this gameobject :

I have an issue, whatever is the status of “Apply root motion” button in the animator component. the hero is fixed on the screen and do not move.

If i start the game with that button checked or unchecked → the hero is bloqued. BUT when I manually click on the button while the game is playing, problem solved, the hero moves.

Whatever is the button “apply root motion” status(checked or not) it’s only when i click on it that the hero is set free !

please help :s.

I have no idea why this is happening actually but I would suggest enabling it in an update function inside of your script. Here is some pseudo code how to fix it.

public GameObject Hero;

void Awake()
{
Hero = GameObject.Find(“Hero”);
}
void Update()
{
Hero.Animator.ApplyRootMotion = true;
}