UnityのAnimatorのアニメーションは、
Animator animator = GetComponent<Animator> (); animator.speed = -1;
のように逆再生が出来る。
しかし、逆再生中はループが始まりません。
How to Reverse animation of Animator and loop at frame zero - Unity Answers 質問したしたがわからなかったが、Unity助け合い所で解決した。
void Update () { // for fix reverse loop if (isReverse) { if (animator.GetCurrentAnimatorStateInfo (0).normalizedTime <= 0.0f) { animator.Play (Animator.StringToHash (ANIM_NAME), 0, 1.0f); } } }
これで解決。
ANIM_NAMEはアニメーション名 isReverseはリバースのフラグ。※通常再生には不要なので。
ちなみに、これで0秒目に飛べる。
floar time 0.0f; animator.Play (Animator.StringToHash (ANIM_NAME), 0, time);