Search Unity

Using CrossFade to play a clip once at a specified speed?

Discussion in 'Animation' started by sgoodrow, Feb 12, 2014.

  1. sgoodrow

    sgoodrow

    Joined:
    Sep 28, 2012
    Posts:
    150
    I've found that using animation.CrossFade(name) ignores animation[name].speed if the clip is wrapped as "Once", however it does not ignore the speed if the clip is wrapped as "ClampForever". This is further verified here: http://answers.unity3d.com/questions/147168/using-wrapmodeonce-and-speed-cuts-animation-premat.html

    Unfortunately, switching all of my "Once" clips to "ClampForever" has the unfortunate drawback of them no longer properly dictating that they are finished playing (isPlaying remains true, as it should), or being able to easily re-run them with a further call to CrossFade (.time is never reset to 0).

    Does anyone have a good solution for this? Perhaps Unity could explain why CrossFade doesn't use the speed parameter for "Once" clips?