Humanoid root motion with additional non-humanoid bone.

Hi,

I’m trying to come up with a solution for an animating humanoid interacting with an external object, and I am using unity’s built in humanoid root motion to update the transform of the character while it’s animating. What I’m trying to do is have a non-humanoid bone (lets call it the prop bone) that is parented to the character’s root, and is included in the same animation clip. I’d like to use this bone to position an external object so the object reacts realistically in conjunction with the character animation. Unfortunately, when root motion is enabled, the prop bone isn’t adjusted in the same way that the character’s bones are. The root motion causes the prop bone to behave differently than originally authored in the animation, it rotates and translates along with the root, rather than staying relative the character it was authored against.

I’m wondering if there is a way to include a prop bone in unity’s root motion “adjustment” of the animation, so that it stays relative to the character.

I’ve considered parenting the prop bone under one of the humanoid bones, say the hips, for example. But this would cause the bone to have to be “counter animated” to compensate for the character’s motion.

I’ve also considered separating the two animations and applying the prop animation separately to the prop, rather than having the animation data live in the same clip, but I’d rather have the animations consolidated if possible.

Any thoughts/advice appreciated!

Thank-you.

Update;

I got this working by writing a maya script to parent the prop bone under the hips, while maintaining the world space animation. Once I did this Unity picked up the bone in it’s root motion adjustment. Must have something to do with being under part of the skeleton that Unity considers humanoid.

1 Like

That’s cheating! :slight_smile:
Glad you found a solution.