2

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

  • I'm not sure why my question was down voted so I'll add more information. I've looked at the transform and rotation 'based upon' and tried all those options. I've also tried setting up an IK direction equal to the forward direction of the camera, this doesn't allow the animation to rotate properly it just stays in place. I have also tried playing with the avatar mask to limit to just arms or to transform around spine 1 or 2 etc, still no luck. – Ben Maggiori May 03 '20 at 16:53
  • i also dont know why its downvoted it seems like a problem a lot of people will run into – vasmos May 03 '20 at 18:44

1 Answers1

0

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

vasmos
  • 2,472
  • 1
  • 10
  • 21
  • Thanks for the fast response, I adjusted the transform section in the avatar mask to include the hips from what I can see, but still no luck, I'm not sure how to add images to comments to show what I have so I added it to the original question. – Ben Maggiori May 03 '20 at 17:56
  • This helped a lot thank you! I eventually found that to stop the rotation I had to tick the "foot IK" option of the animation which allowed my feet to stay in place and rotate the upper body movement! the only problem I had is the knees touching each other due to the rotation but I can probably find a way around this by trying a different locomotive animation pack that has the hips pointing forwards in the original pose. Thank you for your patience vasmos. – Ben Maggiori May 03 '20 at 19:05