Search Unity

Animator: Negative speed multiplier

Discussion in 'Animation' started by thomak-dev, Jun 3, 2016.

  1. thomak-dev

    thomak-dev

    Joined:
    Mar 8, 2015
    Posts:
    15
    I'm trying to alternate between wheter a non-looping animation should play backwards or forwards from script. I do this by setting an Animator Parameter to a negative or a positive value and having the state's Speed Multiplier use this parameter.

    The problem is that when I set it to a negative value the animation freezes.

    Is this not supported or should I file an issue in the tracker?
     
    Last edited: Jun 6, 2016
  2. TrickyHandz

    TrickyHandz

    Joined:
    Jul 23, 2010
    Posts:
    194
    This is supported and I can verify it works in 5.3.5. Is there anything else that could be affecting the animation (component, statemachinebehaviour, etc)?
     
  3. thomak-dev

    thomak-dev

    Joined:
    Mar 8, 2015
    Posts:
    15
    I reproduced it (in 5.3.5) with a clean GameObject without any additional behaviours. I realized that it's working with looping animations, but not with non-looping ones. I need it to work with the latter, so the issue still exists.
     
  4. TrickyHandz

    TrickyHandz

    Joined:
    Jul 23, 2010
    Posts:
    194
    I was able to reproduce the behavior you are seeing. I did just like you and started clean to establish a minimal repro case. I have done a quick test with a Humanoid rig, but would be interested to see if a Generic rig would behave any differently. I would recommend filing a bug report on this.
     
unityunity