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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Best Approach for Rotoscoped Animation

Discussion in '2D' started by old_conrad, Feb 9, 2020.

  1. old_conrad

    old_conrad

    Joined:
    Nov 16, 2019
    Posts:
    2
    I have spent some time trying to fix this, and have had no luck. Hoping this has been suggested before.

    I am trying to create a more realistic animation in my game by using a rotoscoped walking animation. I have tried simply using velocity and 'normal' unity movement, and cannot get over the "conveyor belt" look of the character simply moving across the foor. Even when I feel that the speed is correct. I want to capture the acceleration and decelaration of each step.

    The only approach I could think of was to use the pivot point of the leading foot through each step to ensure that the movement across the x axis looks as realistic as possible, and then imbetween animation frames move the character the required distance. This is where I'm having a problem. Regardless of whether I use code, animation events, c sharp state machine checks, I cannot achieve this. It doesn't seem possible to move the character 'between' frames.

    Either the animation changes first, and then the x axis movement happens, or vica versa, resulting in what looks like a single frame jump backwards or forwards in the animation.

    Has anyone ever tackled something like this before?
     
  2. old_conrad

    old_conrad

    Joined:
    Nov 16, 2019
    Posts:
    2
    Actually, I think I managed to find away around it. Not sure if there is a better way, but the approach I went with was to delete the animation transitions, as I found they were getting in the way.

    In the Update or FixedUpdate methods, I simply called a method to move the rigidbody of the character, and on the very next line triggered the next animation I needed through through code (Animator.Play()). The result was that the character movement and blend to the next animation seems to occur imbetween frame, so there's no jumping around on the x axis.

    Appreciate it is going to be a lot of work to get a whole game working with that approach, but it really was the look I'm going for, so I've left my post up in case others have a better idea.

    Only problem now that I've got a slightly more realistic movement with my character, is I can't help but think my rotoscoped walking animation is far more camp than I think suits the protagonist of my adventure. But that's next Sundays problem.