x


Can you start an animation after the joints has blended to the start position of that animation?

Hey, I'm new and just started learning unity, I have searched, but had no luck finding an answer to my problem.

This is what I have now:

// Play the shoot animation
if (Input.GetButtonDown ("Fire1"))
{
    animation.CrossFadeQueued("shoot", 0.3, QueueMode.PlayNow);
}

And when pressing "fire" the shoot-animation blends in over a course of 0.2 seconds. I can lower this value to like 0.1, but that makes te motion too fast, and at 0.2 he never reaches the initial position of where the arms should be at when firing. Since it's only a gun recoil-animation it's also very short. I'd like to know what to do about it. I was thinking of having the blend start and as soon as unity have blended between arms at idle and the start frame of the shoot-animation I want the shoot-animation to start.

I hope someone understand and are able to help out! Thanks in advance

more ▼

asked Nov 17 '10 at 04:13 PM

Dag gravatar image

Dag
1 1 1 1

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

From what you're saying it sounds like poses in your idle animation and you fire animation are very different, which is not very good idea. You should always try to make poses as close as posible, because otherwise you'll get blends which do not look natural.

See this project: http://unity3d.com/support/resources/example-projects/3rdpersonshooter It can give you some good ideas.

more ▼

answered Nov 18 '10 at 08:33 AM

Paulius Liekis gravatar image

Paulius Liekis
7.3k 16 24 47

Oh, I http://see.So should I strive to make the idle pose the generic pose and have my animations start from there?

Nov 19 '10 at 02:30 PM Dag

Thanks a lot by the way!

Nov 19 '10 at 02:30 PM Dag

Something like that. Games usually have multiple generic poses (in most cases it's "stand idle", "stand idle aim", "crouch idle", "crouch idle aim" and so on) and then you transition beween them depending on you character state. But there are no strict rules - you do what ever works best for you. It just my recommendation how I structure my skeletons.

Nov 20 '10 at 08:35 PM Paulius Liekis
(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:

x18

asked: Nov 17 '10 at 04:13 PM

Seen: 663 times

Last Updated: Nov 17 '10 at 04:13 PM