Reputation: 11325
The first problem happen when I'm playing a stand up animation took from mixamo.com including a character from mixamo. The animation is working fine and the character does stand up but in the end when the animation finish some parts of the character are rotated not to 0,0,0 so the character seems a but standing on the side. Maybe this is how it should be but I wonder if there is any way to make the character standing right like 0,0,0 ?
The mixamo character is Medea. And this is a screenshot of it before running the game :
And this is the character after the animation ended : When you arel ooking on the left scene view window the character seems to be standing fine also on the right in the Inspector the rotation is fine 0,0,0
But when you are looking on the left on the game view window you see that the view rotation is not like 0,0,0
When I'm looking on some of the mixamo character childs like the mixamorig:Head or the neck and other childs some of them the rotation is not 0,0,0 and if I will play with it and change some of them to 0,0,0 then the character will looks like standing fine looking forward straight :
I tried now and changing only the head rotation to 0,0,0 make it looks fine.
The problem is how to change the head to 0,0,0 when the animation end ? It will looks bad like the head is turning strange at once to 0,0,0
My problem is not how to change the head rotation at the end of the animation but that it will look bad that the head is suddenly change rotation.
Upvotes: 0
Views: 1406
Reputation: 512
Seems like you're building a first-person game and using the ready to use animations from Mixamo. If this is the case, don't attach the camera on the head. Head will move based on the animation which is not in your control.
If you want to give a realistic feeling for cutscenes for example, at the beginning of the game, the character is standing up, etc., then you can add 2 cameras, one to the character, and a second one is on the head. So during the cutscenes, you can use the head-mounted camera and for the gameplay, you can switch to the normal camera.
You can also use just one camera mounted on the character (not the head) and try to update the position of the camera based on the position of the head until the cutscene ends, then set the camera to the default position (you can set an animation event at the end of the animation to do that).
Upvotes: 1