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.

Mecanim animation

Discussion in 'Animation' started by Maria Chernykh, Oct 22, 2013.

  1. Maria Chernykh

    Maria Chernykh

    Oct 31, 2012
    I am using Mecanim in Unity 4.2.2f1. I have one animation clip for running forward. I want to make running backward also using this clip by setting it's speed to -1 (it looks ok).

    To make perfect transition between these clips I need to fulfil the following: if at the moment of transition we have the normalized time of running forward clip equal to n (n lies in 0..1 range) then we must transit to normalized time of running backward clip equal to 1 - n (and vice versa).

    Can I somehow realize this scenario by means of Unity Editor or is the only way to do it is setting normalized time from script?

    P.S. I've tried to implement this using Animator.ForceStateNormalizedTime(), but it causes sudden flickering of the character (while pose is ok) - it looks like a one-frame lag. No matter where to place this function: in Update, FixedUpdate or LateUpdate there's always this flickering for a second.
    Last edited: Oct 22, 2013