Search Unity

Animation hiccups when animating sections of spline

Discussion in 'Animation' started by kloveridge, Aug 22, 2015.

  1. kloveridge


    Apr 25, 2015
    We have a animation where a character travels along a long spline. The animation was done in Maya. At several points along the spline, there are forks in the road where an alternate spline paths can be taken which eventually find their way back to the main path spline.

    To make these junctions manageable, I split the single long animation into several small sections by defining clips derived from the main animation like this:

    Entire Spline animation is 240 frames long:

    Section1 = Frames 0-12
    Section2 = Frames 12-50
    Section3 = Frames 50-100,

    In our Animation, I thought it would be easy to sew these together by defining a state and transitioning from section to section. But after hours of tweaking the transition states, I'm about ready to call uncle. I cannot get unity's animation system to smoothly move from section to section without small hiccups and accelerations.

    Would anyone have any suggestions?
  2. theANMATOR2b


    Jul 12, 2014
    A little more info might be helpful in finding a solution.
    Is this like an on-rails-shooter type game?
    What is the purpose for the spline?
    When do the hiccups happen? Where at on the spline?
    The accelerations are probably happening because the animation length is 30 frames long (1 second) but you are trying to have them happen over the span of 50 frames. This is just a guess, so additional info here would be helpful as well.

    Have you looked into NavMesh? I'm not familiar beyond it exists, but I'd think it would have something similar that can be used in engine.
  3. kloveridge


    Apr 25, 2015
    The application for this is its a map showing character(s) wandering around on a map. I animate a main path of the character as a giant loop that starts and ends in the same spot in Maya. I bake into the animation both position and rotation. In addition to the main path, I also have several alternate paths which just loop off the main path and back to the main path.

    Here's a diagram of basically what I'm doing:


    So the main path is a long path that I break down into 5 animation clips called sec1, sec2, sec3, etc. I then just make a animation controller that plays each section back to back. They are broken into sections so I can insert the alternate paths.

    Anyway. The current result is, when I go from section to section, I get either a sudden pause or a acceleration. I can't seem to figure out how to just make a smooth transition from section to section.