Search code examples
unity-game-engineanimationunity3d-mecanimmixamo

Mixamo upper body rotation only not working


This is my first question on Stack Overflow so I apologise if anything is not to standard. So I'm a beginner in Unity exploring into intermediate territory. I am learning Unity by doing a third person shooter but throwing items instead of a gun. I found the perfect animation pack from mixamo called pro magic pack, which is basically a wizard with casting animations etc.

I have setup the camera, controller etc and I'm working on the animations, to which I have all the jump animations, walk blend tree etc all within MECANIM.

My problem is that I have another layer specifically for upper body movements only so he can run/walk whilst performing an upper body magic casting animation, I have setup the avatar mask for the upper body which works fine, but due to the nature of the animation the upper body rotates as he performs the animation, but this rotation doesn't rotate around the hips he just flails his arms in the current direction the chest is facing.

Is there anything I can do without going down the coding IK's route, or excessive coding (will do this if it's essential)? P.s. I've also tried various checks and unchecks of bake into pose (to which I'm still grasping the understanding of).

Thank you in advance for your help, I've attached some GIF's to understand my issue.

This is the animation I want but only the upper body: Upper Body Animation I want

This is what I currently have: Animation I currently have

It seems like the upper body isn't properly rotating and the spine or hips?

Upper Body avatar mask

EDIT: With thanks to Vasmos for pointing me in the right direction, I have found that enabling not just the upper body on the avatar mask but ALSO enabling the ground as seen here: Upper Avatar Mask

I've added this GIF as the current situation, it looks okay and works almost as I want it to, I just need to figure out how to stop the legs rotating with the base: Correct Direction but body rotating with animation

EDIT 2: After research and help from vasmos, the solution I found to this is to enable the Foot IK option of the animation as seen here: Solution to animation affecting rotation


Solution

  • In the throwing animation the movement begins in the root hips bone, it looks like in your mask you just put the upper body when you still need to include the root hip node. It seems like you are on the right path with layers and mask to blend the two animations just keep playing around with it, just incase you don’t have it : https://docs.unity3d.com/Manual/AnimationLayers.html?_ga=2.241528322.1842043308.1588381034-1055993846.1587850410

    edit: yeah you are close maybe just remove the hip from the upper body mask and start at the next node up(spine?) and keep moving up one node at a time until you get desired effect