x


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?

more ▼

asked Oct 05 '11 at 07:14 AM

DeathByWarrior gravatar image

DeathByWarrior
29 6 6 8

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!

Oct 05 '11 at 07:19 AM syclamoth
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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.

more ▼

answered Oct 07 '11 at 06:33 AM

Azound gravatar image

Azound
668 19 22 39

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.

Oct 07 '11 at 12:54 PM anszwa

Well, it works so... thanks!

Oct 07 '11 at 10:40 PM DeathByWarrior
(comments are locked)
10|3000 characters needed characters left

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?

more ▼

answered Oct 05 '11 at 08:04 AM

anszwa gravatar image

anszwa
93 3 6 7

The animations for the character I made in unity. So they are just animations.

Oct 07 '11 at 03:15 AM DeathByWarrior

btw: Set reload animation to Once and stand animation loop, reload animation still doesn't work.

Oct 07 '11 at 03:25 AM DeathByWarrior
(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:

x3768
x1941
x662

asked: Oct 05 '11 at 07:14 AM

Seen: 1184 times

Last Updated: Oct 07 '11 at 10:40 PM