I dont understand :o

So i am making a FPS controller and all the other animations are crossfading has i want them to but the idle one is just jumping to the first frame instead of crossfading…

If needed this is how i call it:

    void Update()
    {
        if (!gameObject.animation.isPlaying)
        {
            animation.CrossFade("Idle", 0.2f);
        }

        Punch();
        Sprint();
    }

My guess: It’s is because Idle doesn’t play until after your Punch or Sprint animations are completely finished. So then there’s no existing animation to cross-fade with.

You probably want to track how far into your current animation you are, and give it the CrossFade command just before the animation finishes.

Doesnt the “if (!gameObject.animation.isPlaying)” already does that? Hmm

CrossFade plays part of one clip and blends it with another part of a second clip. This means you need to have some overlap where both clips are playing at the same time.

If your animation is not playing, then there’s no first clip to blend Idle with.

Ow, thx that helped me a lot :smile: