Unity general animation, bones root node rotation to parent container!

For three days I have been trying to find a way where the root node of any type of animation could be used to rotate the parent container.

The idea is that the animation’s rotations (root node or controlling node rotations) also rotate the parent container, resulting in the “parent container” always facing in the correct direction of the animation front, no matter what state it ends in.

This has some good advantages and I would really like to find a solution to the problem.
See the image at bottom for what I I’m referring to as the “parent container”.

I have been focusing on the Y axis as it’s the most important and I have tried many workarounds but all result in the obvious. The container is a parent and in result any applied rotation also affects the child objects.

Now this just maybe very simple to resolve, if so just slap me with it :wink:


I really can’t think of a situation where you would want to do this… You realize that rotating a parent of a bone based on the bone’s rotation would result in 2x the rotation of the bone?

It sounds like what you really want is for the animation to drive the character rotation / translation? If so, you need to look into Mecanim. It simplifies the whole process, and uses character animation as the driver for the movement of the character controller. YouTube Tutorial

But if you really wanted to do this (which I assure you will give you unwanted results…)

GameObject spine = GameObject.Find("m002_hi_max2008_01/Bip01 Pelvis/Bip01 Spine");
GameObject moo = GameObject.Find("/m002_hi_max2008_01");

void Update(){
    moo.Transform.Rotation.y = spine.Transform.Rotation.y;

Can’t check this right now, but you might not be able to set y rotation directly.

Yeah I will scrap this idea and use mecanim humanoid. Thanks for the help.