msm

Hi,

I am trying to play an animation in reverse (timeScale=-1), but it seems like the custom timeline events in the animation don't fire at the appropriate time, instead they all seem to fire at the same time at the start or end of the animation loop.

I think I saw mention of this in another thread at one point, but can't seem to find it anymore. Is there a solution or workaround to this?

I have an animation that I am playing forwards, and the custom events fire as expected. But under certain conditions I want to just change the same entry timeScale to -1 to play it in reverse, that is when the custom events all fire at the wrong time.

Any help appreciated,
thanks
msm
  • Сообщения: 52

Nate

AnimationState doesn't support playing backward. Supporting both forward and backward would complicate the class quite a lot. Instead of AnimationState, you can use the lower level Animation API to do what you want. When doing that there may be an issue with EventTimeline, I'm not sure off the top of my head.
Аватара пользователя
Nate

Nate
  • Сообщения: 9949

msm

ok thanks, not a big deal for my case. I can just create a separate animation that is keyed in reverse. Thanks for the help
msm
  • Сообщения: 52


Вернуться в Unity