Search Unity

AI Character sits down while moving forward

Discussion in 'Animation' started by manvir_singh, Feb 15, 2015.

  1. manvir_singh

    manvir_singh

    Joined:
    Feb 15, 2015
    Posts:
    1
    I have an AI Character that goes to a point close to a sofa and trigger the sitting animation through Mecanim. When he sits down, he is moved forward for some reason. This does not happen if I make him sit anywhere else.

    I checked the animations and found that the root position of the player changes in the z direction (it moves behind a little bit as his centre of mass changes). It seems like that the root transform can not move backwards (because of the chair maybe) so it instead moves the character forward. I have tried disabling the colliders on the chair but that did not help as well.
    I tried baking the root position and it works but since my sitting animation is broken into three parts (sit down, sitting, stand up), I can't bake all three of them as the root transform of the last two is different at the start of the animation. So, the 2nd part of the animation again shifts the player forward.

    I am new to Unity3D so if something is unclear or confusing, please let me know.