- Home /
Animation Problem
Hello again, in my FPS game, i have a standing animation that plays when the character doesn't move, it controls all parts of his body. I also have a reload animation which controls his arms and head. The standing animation is put into layer 0 and the reload animation is in layer 1. But when I call the reload animation and the standing animation is playing, the reload animation doesn't play at all. Both are set to clamp forever. Maybe it's because my standing animation is called every FixedUpdate frame? But the animation scripting page tells that it should work if the reload animation is in a higher layer than the standing one. Any ideas on why this happens?
I believe you have double-posted. Remember that if you have less than 15 karma, your posts need to be cleared by a moderator before they can be viewed! Be patient, and please delete the one with the least interest!
Answer by anszwa · Oct 05, 2011 at 08:04 AM
Hello, you are right with the layers, higher layers have more preority than lower once and rewrite lower animation, so that is not the problem.
You said you have two animations an idle(stand) and a reload right, and i think your problem is that you have set them ClampForever, because this causes that the animation is played once in the game and than always remain at the last frame.
My opinion is that you should set the standing animation to Loop and select the loop frame because this animation should be played as long as the caracter stands around, and the reload animation you should set to Once because if you call it with for example a key down input it is played one time (if it is on the higher layer) and than returned to the standing animation. Normaly it should work that way.
One more thing, do you have only one fbx file with the two animations on it or a single fbx file for every animation?
The animations for the character I made in unity. So they are just animations.
btw: Set reload animation to Once and stand animation loop, reload animation still doesn't work.
Answer by Azound · Oct 07, 2011 at 06:33 AM
You seem to have the order of the animation layers incorrect. Layer 0 is the highest priority layer, so if an animation is playing in that layer (and uses 100% blend), then layer 1 will be ignored. Your reload animation should be in layer 0 and your idle animation should be in layer 1.
No thats incorrect as far as I know. Layers with higher numbers have higher priorities. Please tell me if I am wrong but this is like i did it until now and it always worked.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
animation.isPlaying always true and Animation stuck at time 0 0 Answers
animation on key press problem 1 Answer
How to export MMD model to Unity? 0 Answers
Input.GetAxis Animation Problem 0 Answers