Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Character moves forward when sitting - Solved

Discussion in 'Animation' started by Ravvicus, Jun 24, 2015.

  1. Ravvicus

    Ravvicus

    Joined:
    Jan 25, 2015
    Posts:
    3
    Character has three sitting animations.
    1. Stand to Sit
    2. Sitting Idle
    3. Sit to Stand
    When a character is made to sit, it moves forward at the second part - sitting idle.


    If I bake the Root Transform Position (XZ) of Stand to Sit, he sits down correctly, but moves forward when it gets to sitting idle.

    I'd think this would be a common problem, but just can't find any tutorials on it. I'm not searching for the right term I reckon.



     

    Attached Files:

  2. Ravvicus

    Ravvicus

    Joined:
    Jan 25, 2015
    Posts:
    3
    Worked out what was wrong. For any future googler's.

    Root Motion was being handled by a script, and so changes to the Root Position during the stand-to-sit animation were not applied. Removed the script so there was a checkbox tick on Apply Root Motion.

    Also in the stand-to-sit and sit-to-stand animation clips, should NOT Bake the Root Transform Position (XZ) into pose.


    Starting to understand mecanim.
     

    Attached Files:

  3. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Glad you found the solution.
    Nice clothing textures.
     
  4. erolstate

    erolstate

    Joined:
    Nov 16, 2016
    Posts:
    1
    Thank you, I was searching for a couple of hours for a solution. :)