animamation stops head movement unity

Source : https://answers.unity.com/questions/827590/head-rotation-while-animation-is-played.html
Answer by: Cherno.
//"You can/should be able to do it like this:
//Instantiate an empty gameobject at the neck bone's position.
//Make the head bone a child of this empty GO. The bone hierarchy 
//is now broken at the head, But that doesn't matter. Use 
//AddMixingTransform[1] to give any (preferably empty, meaning no 
//head movement taking place) animation clip the head bone
//transform. Play the animation just to be sure. The normal
//move etc. animations should work as usual until they reach the neck.
//It will probably require A LOT of trial and error, I know
//because I spend more than a week IIRC getting this to work.
//For my project, I wanted a character to get into a shooting
//pose, and then turn the torso towards the target and play the
//shooting animation for the torso only. It's a mess with 
//parenting/unparenting, Add/Remove MixingTransforms, Animation.
//Play and CrossFade... But in the end it works. Maybe you can 
//even use layers?"
//[1]: http://docs.unity3d.com/ScriptReference/AnimationState.AddMixingTransform.html

Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source