Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Animation loop twitches on each loop

Discussion in 'Animation' started by Jeepster, Apr 25, 2018.

  1. Jeepster

    Jeepster

    Joined:
    Jan 23, 2014
    Posts:
    401
    Hi,

    I made a series of animations for my characters movements in Maya and they loop seamlesly there, but once imported into Unity the animation loops arent seamlessly looping. There's a small twitch at the start of every loop on all my animation loops.

    Does anybody know why this is happening?

    The animations are bools activated through scripting.
     
  2. Jeepster

    Jeepster

    Joined:
    Jan 23, 2014
    Posts:
    401
    I import the animations as .fbx files btw.
     
  3. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    This is commonly due to the curves going into and out of the first/last animation frames.
    To solve edit the in/out curves of the first and last frames so they flow properly and then - duplicate all the first key frames on frame one, and put them one frame before the animation cycle, and then duplicate the last animation frames and place them one frame after the animation cycle. Then export and on import make sure the key range is the same length as the original animation cycle, excluding the duplicated keys before and after the cycle.
     
    DougRichardson likes this.
  4. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,770
    That’s what I do and it seems to work fine, sorta blocks those keys in. But really it should be the same as your animation software. I wonder if it’s maybe a frame rate difference? Or keys getting mushed up through optimisation?
    Anyway, this worked for me so I left it at that :)