- Home /
Character animations - Seperating a body parts animations/splitting animation
I am about to start animating a character for use in a unity game, but I am running into a problem:
I need the have animations for him to run like normal, and also need to be able to have his right arm holding a weapon, and aiming the weapon with LookAt towards a raycast (his firing of the weapon depends on a ray from player input depending on platform).
So the problem means I need a way to have his arm as either a seperate object inside unity, and handle the aiming seperately? or perhaps I need to make changes to his skeleton in Blender to allow that arm to be seperately animated? How would you accomplish this kind of animation system with blender/unity?
Keep in mind that the character is either standing still, or most of the time, running forwards, and that he never rotates his body, just aims his weapons around as he fires toward targets.
PS If thats too hard to understand, I could upload the development build AP$$anonymous$$ for testing on android devices
well, I believe you should be able to just access the arm bone via scripting to animate the arm as desired. In which case you would probably want to avoid having the arm in question animated as part of your base animation(s), but just rotate the arm bone directly via code.. This should work on top of other animations that are playing I believe.. also have a look here:
http://docs.unity3d.com/Documentation/$$anonymous$$anual/AnimationScripting.html
using additive animation similar to the example here may be another alternative, depending on your exact needs.. you can have multiple additive anims playing at once too, such as an up-down arm movement, a left-right arm movement, and your base running/idle. Either way, I don't think there are any additional special requirements for setting up your model.
thanks for the info, I will look into this and check back later!
Answer by MD_Reptile · Oct 15, 2012 at 02:05 PM
Thanks for the help, what worked for me was to animate everything but the bone i needed to script the movement for, then drag and drop in inspector, and modify the transform of the bones game object, how easy! I love unity lol.
Anyway thumbs up to You guys for the pointers!
Answer by Paulius-Liekis · Oct 15, 2012 at 01:33 PM
Look into AddMixingTransform function.
See this tutorial: http://unity3d.com/support/resources/example-projects/3rdpersonshooter And video "Unite 09 - Character Animation tips and tricks" about it here http://unity3d.com/unite/archive/2009
Your answer
Follow this Question
Related Questions
making and exporting animations involving multiple separate objects from to unity 0 Answers
Problems with an animation 0 Answers
How to fix main camera moving with animation of parent player object? 1 Answer
Blander animation moves differentry in Unity 0 Answers
Conversion warning: has translation animation. It is not supported 2 Answers