- Home /
Animations don't crossfade when changing
Okay, so I've been working on a first person controller. You can run or just walk. When you walk or run, the animation looks fine. It's when you try to run immediately after taking out your gun. The running animation basically jumps to the animation, rather than crossfading to it. It doesn't do this when I'm walking and switch to running. Only after taking the gun out. It also happens when jumping too. The animations kind of glitch back and forth, rather than crossfading like I wanted.
This will make MUCH more sense after you watch this video:
https://dl.dropbox.com/u/2318787/Untitled.mov
Sorry about the bad quality. I can't play with high graphics while recording.
Since the code is way to big to post here, I'll just post the code that manages all the movement animations.
https://dl.dropbox.com/u/2318787/untitled
Any help would be extremely appreciated. Thanks
have you tried putting ur animations in layers and crossfading them that way??
Answer by TheDavil86 · Aug 11, 2012 at 03:23 PM
My suggestion is to do some simple tests to see if your logic is wrong or if your way of handling the animations is wrong. For example put 'Debug.Log("Crossfading");' after the actual animation code and that will give you a debug message if your logic is going through the way you think it should.
You may also consider adding a time to the crossfade as the second argument because that will make the crossfade happen in a set amount of time instead of waiting for the other animation to finish as much. Also keep in mind if you're calling the crossfade animation several times that's going to likely confuse the system so it will be crossfading repeatedly.
Your answer
Follow this Question
Related Questions
CrossFade won't crossfade animation, it just jumps to it. 0 Answers
How to use CrossFade with anim2 when anim1 is over? 1 Answer
Why is Animation Not Playing in Reverse? 2 Answers
Animation/CrossFade difficulties, Animation won't CrossFade 0 Answers
Can the animation editor create local rotational data? 3 Answers