playMaker

Author Topic: How to : Transition animation after the use of an Avatar Mask  (Read 1576 times)

Tug69

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
How to : Transition animation after the use of an Avatar Mask
« on: December 04, 2015, 12:05:12 PM »
Hello,

I will try to explain my problem.
I have an animator controller for my main character (Using Mecanim Humanoid).What I wanted to do is when the character is running (I have a blend tree with  walk/jog/run) I want him to throw a knife.
So I created an Avatar Mask plus a New Layer in the animator, I have putted a single animation inside it where there is only his left arm that take the knife from his back to throw it forward.
Everything is working OK but when the knife is thrown the arms goes back and instant jump where it has to be for the Run animation when the throw animation end.
I cannot blend because of I have 2 transitions in my second layer, they are between an empty state and the Knife throw state.

So I wonder about how can I blend this animations together.

Thank you for reading.
I hope that my not very good english skill will not be a problem.
« Last Edit: December 05, 2015, 04:01:47 AM by Tug69 »

mdotstrange

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
    • Can't code? Who cares! Make games anyway!
Re: How to : Transition animation after the use of an Avatar Mask
« Reply #1 on: December 06, 2015, 05:01:43 PM »
Did you try switching the Blending types on the Mecanim layers?

You can also adjust the knife throw animation so that its start and end frames better match your run animation-

This is also another good technique when you want to layer arm movements on to of other animations https://www.youtube.com/watch?v=HLD7ZCoPAGA
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Tug69

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: How to : Transition animation after the use of an Avatar Mask
« Reply #2 on: December 07, 2015, 08:07:05 AM »
Thanks you for your answer.

I tried Additive and Override, the problem stay the same, it does not give me any transitions between animations because of I cannot make a transition link from my locomotion blendtree to my Hand throw animation, the layer only give me the choice to do transition between an Empty state (with no animations in it) and the    Knife throw animation.

I also cannot use the video you have linked because of it modify the animation itself and my problem is only the transition between 2 animations that are in different layers.

Pardon my lack of knowledge, Im totally lost actually !


Ps : The video finaly gave me and idea, I will try that thing : When I press the throw button Ill set up a IK goal right before starting the throw animation, I'll see how it looks.
« Last Edit: December 07, 2015, 08:09:51 AM by Tug69 »

Tug69

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: How to : Transition animation after the use of an Avatar Mask
« Reply #3 on: December 08, 2015, 04:59:00 AM »
I tried to set an IKGoal but even with it when it transition for the knife throw the arm is jumping like there is absolutely no transition.

Ok So I was zoomed a bit too much on the arm, the "instant jump" transition is little, it is working pretty well when the camera is at a normal distance.

How I did : During My run animation the whole body is moving so I added one empty game object as children of  the "Bip001 L Clavicle" at a slightly modified position (a bit up + a bit forward). This Empty Game Object is the IK Goal for the left hand that will catch a knife in his back.

Input Throw Button =ยป Use a IK Goal that have it's Position Weight set by a "Curve Float" The Hand is going up to catch the knife and when it's up enough for my animation I use a "Set Animator Bool" for the transition and I Lower the Position Weight of the IK Goal to 0 with a curve float.

As it Worked for this transition I will use approximatively the same stuff to get the hand back to running.

The video you Linked was a good basis to give the idea.
Thank you for your help.
« Last Edit: December 09, 2015, 04:29:29 AM by Tug69 »