Search Unity

Why when creating new animation clip and drag in a character it's changing the character position ?

Discussion in 'Timeline' started by Chocolade, Dec 21, 2018.

  1. Chocolade

    Chocolade

    Joined:
    Jun 19, 2013
    Posts:
    933
    Is there a fix or a way to avoid it ?
    I can upload some screenshots to show what I mean.

    In the Timeline when I add a new animation track and then drag in a character from the hierarchy it's changing the character position far away from where it was and also the weapon that was attached to the character is now not attached but position near the character.

    I wanted to create some animation clip/s but every object I drag in to the animation track lost his position.

    I'm using: Unity 2018.2.5f1 Personal (64biit)

    And I don't want to upgrade to the new unity beta version, I tried it before and it was making a lot of mess in my project.
     
  2. thierry_unity

    thierry_unity

    Joined:
    Jun 10, 2015
    Posts:
    187
    Hi,
    can you share a small example project we can have a look into?
     
    Chocolade likes this.
  3. Chocolade

    Chocolade

    Joined:
    Jun 19, 2013
    Posts:
    933
    Hi,

    Here is a link for a small project I created with the problem. Playing the Timeline or the game it self will show the problem.

    https://1drv.ms/u/s!AtV2OUzEcRzrlnqDEqCpJvgqCLZA

    The file name to download is: Anim Testing.rar
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    In 2018.2, you can set the started position of your character to

    1) Fixed position - Make sure your animator does not have a controller, and set the track offsets on the animation track to the starting position/rotation you want the character to have.

    2) Relative - add a controller to the animator. This will not preview in the correct position but in playmode the character will start the timeline from whatever their current position/rotation is.

    In 2018.3 this has been changed to be an option on the track itself (track offsets/scene offsets) and does preview correctly.
     
    Chocolade likes this.
  5. Chocolade

    Chocolade

    Joined:
    Jun 19, 2013
    Posts:
    933
    Tried it all already. The character Animator don't have any controller.
    In the new version 2018.3 in the track it self I set it already to Apply Scenes Offsets

    But still when in the track it's getting to the part it's switching(transition) between the two animations HumanoidWalk and HumanoidIdle it's making the character to move push back.

    I added a link to a project I did showing the problem.
     
  6. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Each clip has it's own offset. Right click on the second clip and select "Match offsets to previous clip"