Hi. I’m creating a football player kicking a ball. (I’m using Blender and Unity)
I’m trying some special movement something like “Marseille Turn” you know a beautiful turning movement with a ball.
I’m noob. Creating player’s movement without mocap is not impossible I think. We can use YouTube’s soccer player movement. Posing character frame by frame. It would take time but not impossible.
But dealing a ball is different. Maybe ‘physically’ controlling a ball is impossible.
So I tried to control a ball with animation.
I created a human character and added a bone for a ball’s position.
And I make football player’s animation with ball.
And my character’s rig should be ‘generic’. because bone for the ball cannot be a part of humanoid system.
I think the right solution in this case is to use a mix a physic and animation for your ball.
When you character is doing a special move like “Marseille Turn” the ball should be animated to follow the special move and as soon as you player kick the ball you will need to switch to physic. This can be achieved by deactivating the transform for the ball on the rigs when you switch to physic and instanciating a new ball transform at the same position,rotation than the one on your rigs
The humanoid rig support additionnal bone and props so that shouldn’t be an issue
Thank you for your reply. I know about additional bone(I read your article in another thread.). But It didn’t work well…
The ball’s bone position(ball bone animation from blender) wasn’t correct when it was humanoid rig. And When I use generic rig, at least ball’s position is correct. (Generic rig has much limitation. If I use generic, I cannot use many free humanoid animation sources from assetstore.)
And when I enable ‘mirror’ option(humanoid rig), the player’s movement get flipped well. But ball’s additional bone doesn’t get flipped. I need both direction.
So now I’m trying to make mirrored animation in Blender. And apply it on generic character. For now, it’s the only way something works.
-left white: humanoid
-right colored : generic
look at ball’s position. And mirror issue.
This is probably because your character rig is different than the rig in the source animation file
yeah this is expected, we can only mirror human bone because we know which bone is the mirror of the other one:
left leg ↔ right leg
left foot ↔ right foot
This is a very interesting case,so we would like to check this out with you, could you send us the original file with the animation, the white humanoid file and the generic one too.
You could log a bug and attach all those file and send me the bug number once you get it or if you prefer another way to share your files just let me know
We think that if the ball is parented to the root transform we could with a script mirror the animation for the ball but we need to test this out
Thank you for keeping attention on this topic. You know, I’m trying to figure out something. So now everything is different. The humanoid rig file is now changed.(it’s not like the gif movie now.)
But I figured out something.
Armature’s highest bone(In hierarchy) is General Root. (It not hip bone). If the ball’s bone is child of General Root, ball’s movement is fine. If ball’s bone is not a child of General root, the ball goes too far.(ball movement+General Root movement = unity’s ball animation) It’s opposite from blender.
But now I have Y position problem. It’s hard to avoid.
At first my model stand still. And he ducks a bit(lower his chest). His knees bend a bit too.
In generic rig, everything is alright.
But in humanoid rig, he ducks in the air. His chest remain same height and his feet ascend.
How can I avoid it?
And the script for mirror? It would be great!. It would be help very much. If I can handle the additional bone’s mirror effect and humanoid’s Y position problem, that would be great. Please help.
And I can attach my model’s blender file. It’s nothing special. it’s here. But it’s not exactly same as the gif movie.
This is probably because your animation clip setting in the importer are not setup correctly http://docs.unity3d.com/Manual/class-AnimationClip.html
Change setting for Root Transform Position(Y) until you get what you want.
Try to enable Bake Into pose and set Based upon Feet, that should do the trick
would you mind to export your blender file as a fbx file? I don’t have blender currently installed on my system and it easier for us to handle fbx file as it natively supported by unity
Here I attached Fbx version.
The Root transform position option…I already tried every option one by one.(before ask here)
And I enabled ‘bake into pose option’ of Root transform rotation, Root transform position(feet).
It doesn’t work. I wonder how ‘feet’ option work? Is it affected by ‘ball additional bone’?
For now, only generic rig works.
Humanoid rig causes Y position problem. Always. no matter what option I apply.
Hi.
Now I’m working with Generic Rig. I gave up humanoid rig on my current project.
It’s my second project.
Humanoid rig was very useful when I make my first project. I released it on google Play Store last month.(https://play.google.com/store/apps/details?id=com.dreamyTyper.timeStopper) I could use animations from AssetStore. It is very powerful advantage of humanoid rig.
In my first project, there was no problem. I was enabled ‘bake into pose’, assigned Root transform position ‘Feet’.
But now, the soccer player has Y position problem with humanoid Rig(+additional bone for ball).
I gave up. For now, generic is the answer. I don’t know why that problem happens.
Hi~!
I found some mistakes of mine. Humanoid rig works good. I found that wrong bone was assigned as a root bone. I fixed it in the ‘Configure’ scene. After then, the Y position problem solved. It was my foolish fault.
You told about ‘mirroring extra bone with script’. Is it possible?
If it is possible, it would be a big present for many developers.
Thank you for your advice. But I can’t understand “separating the player animation and the ball animation”.
I just…made some animations in Blender and imported it.
I cant use Blender, but was thinking something like exporting out only the players full rig animation, and then only the ball w root position. and in game putting those two transforms on same position.
yes I think I would do it like that. and then turning the ball into physical object any time in the code.