x


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

more ▼

asked Aug 11 '12 at 12:05 PM

Syllith gravatar image

Syllith
44 9 10 13

have you tried putting ur animations in layers and crossfading them that way??

Aug 11 '12 at 03:06 PM stoner221
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Aug 11 '12 at 03:23 PM

TheDavil86 gravatar image

TheDavil86
38 3 5 6

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3783
x82

asked: Aug 11 '12 at 12:05 PM

Seen: 300 times

Last Updated: Aug 11 '12 at 03:23 PM