now for mecanim you will have to do a little more work but this will help if you want to use the same animations for all your characters an allow more flexibility...
First you will want to make sure your character is set up for mecanim which is done simply by choosing the rig as humanoid an hitting configure in the inspector as seen below...
now for the mecanim set up on the model it self. first if your model is already set up for mecanim it will already have the following settings humanoid an a check mark next to configure..
if not you will have to chose it an and then configure it. issue here is that unity mecanim requires a t-pose so if your model is not in t-pose the skeleton in the scene window will be red on the parts that are not in t-pose formation so you will have two options do the t pose manually or try to force it into a t-pose but in the end it should look like the pick below..
were i circled mapping just choose auto mapping.
in the left hand side i circled the avatar that should now be in your player prefab. its added by unity so you can use mecanim animations on the model..
now that your player is set up lets set up our animations..
best to use the tut on this site but ill give you a short run down on the essentials...
first add your idle state then after that add all your other animations that you want to use .
id rename them to something simpler int he inspector to make things easy
walk run and death will not be connected to anything
all others will have lines going from any state an then back to your idle.
to clarify on this would go like this
anystate > to animation state > idle
your parameters can be added by hitting the plus sign and choosing trigger from the list that pops up give each one a simple name you will need these later to add them to your list. as seen below
from your anystate lines click on them an change the name to the trigger you are using
you can figure out what to change by looking at this picture an click the lines going from your animations states to idle
then last but not least heres how your animation list will look for mecanim
first idle walk run will look like this
and then ones with the triggers will look like this
make sure you stick your newly made controller into the characters animator component
This is a great tut but could you go more in depth on legacy animations and how to set them up along with the input keys and control maps? I've went through all the tutorials on setting up the control maps and added a function to make the char thrust but its using the jump animation when I set it up for attack. I'm sure I missed something but not sure what.
ORK's animation system, in short, works like this: - you define an animation type, that's what is played by ORK - you assign an animation (e.g. a legacy animation) to an animation type in the animation settings - you use the animation settings for a combatant
Now, to use the animation, e.g. in an attack, you'll use the Combatant Animation step in the battle event to call the animation type you want to play. The combatant will look for the currently assigned animation to that type and play it. Equipment and status effects can override the assigned animations to e.g. have a different attack animation for swords and spears.
Control maps assign an action (e.g. using an ability) to an input key. Pressing the key will (if possible) use the action, which is animated by battle events that play an animation type on the user.
If you need a special attack animation, add a new animation type, assign the actual animation to the type in the animation settings that are used by your combatant and play the animation type in the battle event the special attack's ability uses.
Post edited by gamingislove on
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
now for mecanim you will have to do a little more work but this will help if you want to use the same animations for all your characters an allow more flexibility...
First you will want to make sure your character is set up for mecanim which is done simply by choosing the rig as humanoid an hitting configure in the inspector as seen below...
now for the mecanim set up on the model it self. first if your model is already set up for mecanim it will already have the following settings humanoid an a check mark next to configure..
if not you will have to chose it an and then configure it. issue here is that unity mecanim requires a t-pose so if your model is not in t-pose the skeleton in the scene window will be red on the parts that are not in t-pose formation so you will have two options do the t pose manually or try to force it into a t-pose but in the end it should look like the pick below..
were i circled mapping just choose auto mapping.
in the left hand side i circled the avatar that should now be in your player prefab. its added by unity so you can use mecanim animations on the model..
now that your player is set up lets set up our animations..
best to use the tut on this site but ill give you a short run down on the essentials...
first add your idle state then after that add all your other animations that you want to use .
id rename them to something simpler int he inspector to make things easy
walk run and death will not be connected to anything
all others will have lines going from any state an then back to your idle.
to clarify on this would go like this
anystate > to animation state > idle
your parameters can be added by hitting the plus sign and choosing trigger from the list that pops up give each one a simple name you will need these later to add them to your list.
as seen below
from your anystate lines click on them an change the name to the trigger you are using
you can figure out what to change by looking at this picture an click the lines going from your animations states to idle
then last but not least heres how your animation list will look for mecanim
first idle walk run will look like this
and then ones with the triggers will look like this
make sure you stick your newly made controller into the characters animator component
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
http://tinypic.com/r/2u79lqo/8
http://tinypic.com/r/i408c7/8
http://tinypic.com/r/16gh3wk/8
- you define an animation type, that's what is played by ORK
- you assign an animation (e.g. a legacy animation) to an animation type in the animation settings
- you use the animation settings for a combatant
Now, to use the animation, e.g. in an attack, you'll use the Combatant Animation step in the battle event to call the animation type you want to play. The combatant will look for the currently assigned animation to that type and play it. Equipment and status effects can override the assigned animations to e.g. have a different attack animation for swords and spears.
Control maps assign an action (e.g. using an ability) to an input key. Pressing the key will (if possible) use the action, which is animated by battle events that play an animation type on the user.
If you need a special attack animation, add a new animation type, assign the actual animation to the type in the animation settings that are used by your combatant and play the animation type in the battle event the special attack's ability uses.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!