Search Unity

Using timeline editor to animate game object position is not working how I would expect.

Discussion in 'Timeline' started by ManjitSBedi, Jun 3, 2017.

  1. ManjitSBedi

    ManjitSBedi

    Joined:
    Mar 8, 2014
    Posts:
    32
    I am getting very confused. I am using the newly released Unity Beta 2017.0b8. I have a game object with two tracks one for the movement & one for the animation clips.

    Somehow, when I record an animation by adding key frames and using the move tool, the x & z positions are being swapped depending on how I am running the scene. When I scrub through the preview of the animation movement, it is moving the object on the x axis from the timeline window.

    But when I hit play in the Unity editor, the object is being move along the z axis.

    I should mention, the game object has an initial rotation of 90 degrees (but that should not affect the object translation?); is that a contributing factor? I am quite new to using the timeline editor, could there be some other setting that affects how an animation is played back?

    In the attached image, I went & changed the z values & z values to work as I want them to in the scene playback.
     

    Attached Files:

  2. thierry_unity

    thierry_unity

    Unity Technologies

    Joined:
    Jun 10, 2015
    Posts:
    178
    Hi @ManjitSBedi
    This is definitely a weird behavior,
    Can you share your project with us so we can have an eye on the issue?

    Thanks!
     
  3. ManjitSBedi

    ManjitSBedi

    Joined:
    Mar 8, 2014
    Posts:
    32
  4. thierry_unity

    thierry_unity

    Unity Technologies

    Joined:
    Jun 10, 2015
    Posts:
    178
    Ok from what we investigate you have hit the same problem that other have faced in the past. Unfortunately it is not possible to record animation on a humanoid which is an animation limitation.

    The only workaround I can give you right now is to have a parent gameobject that would be used to record the position and keep the Humanoid object for animation clips.

    tell us if this fixed your problem
     
  5. ManjitSBedi

    ManjitSBedi

    Joined:
    Mar 8, 2014
    Posts:
    32
    I see; I will have a try soon & see what happens.

    Thanks.
     
    thierry_unity likes this.
  6. thierry_unity

    thierry_unity

    Unity Technologies

    Joined:
    Jun 10, 2015
    Posts:
    178
    Keep us posted,
    we are discussing internally to see if we could come up with a better long term solution. Another workaround that was mentioned was to manually modify the animation itself so it would affect the motion of the character.
     
    ManjitSBedi likes this.
  7. ManjitSBedi

    ManjitSBedi

    Joined:
    Mar 8, 2014
    Posts:
    32
    Yes, that is a good point. How hard would it be to make a utility script that could display a console warning or pop-up to warn a user that animations might NOT work as expected? I will probably remember this but sometimes one does forget.