- Home /
Character falls thru to his waist
I have followed the Mecanim tutorial thru and now Im trying to get my own character into the system. Im falling at the first fence! After setting up the avatar, and adding capule collider and rigid body, I tweaked the cap collider to fit and hit play, and he fell thru to his waist. As you can see from the picture there appeasrs to be some default anim connected, even tho I haven't got that far yet. The character is a Mixamo thing, and as such has a greyed out anim there by default. Could this be causing it? How can I stop this? looks ok? In the mud
Answer by Emericanized · Feb 26, 2013 at 06:59 PM
Ahoy, Mark! Not sure if you're still having this problem, but I think I can be of some assistance!
You may notice at run-time that you get a yellow error in the log regarding the particular animation file you're trying to play. It mentions that you have a generic animation, but you're trying to apply it to a humanoid rig, so it discards it. (It seems to stick the character in the muscle test pose when it has nothing else to go on, which is what you're seeing in screenshot numero dos)
To Fix this:
1.Select your animation FBX files, and click on the rig tab in the inspector.
2.Change "Animation Type" to "Humanoid".
3.Change "Avatar Definition" to "Copy from Other Avatar".
4.Now in the "Source" field, choose the Avatar file linked to your In-world character.
5.Press apply!
I hope that does the trick for you, I know I had to spend some time digging around to figure it out when it first happened to me. Let me know if you're problem is resolved, it'd be nice to be able to contribute to a solution once, I spend most of my time asking questions :P
John S, Tech Animator
Answer by McDirty · Jul 04, 2015 at 09:52 AM
This is a super old thread, but I want to mention what the actual cause is... The Avatar your animations are referencing is not the same avatar as currently being used. They were set up with a different rig at some point and thus cannot place the pivot of the model in the appropriate place.
TL;DR make sure you are using the exact rig with the animations.
Answer by jfn73150 · Aug 16, 2018 at 05:12 PM
Make sure in each clip of your animations (Inspector tab) that your ROOT TRANSFORMATION POSITION (Y) is set "Based Upon - FEET"! If the Inspector tab is grayed out then click on EDIT right below the cog wheel in the inspector tab at the top right. Make sure to click apply when you make changes, found at the bottom of the same window scroll down. (Only if it was all grayed out, there will be no apply button if it wasn't grayed out.) Also make sure bake into pose is checked. Then while having the scene run use the scene view to look at the distance of the players feet from the ground. While doing that use the offset from root transformation position (Y) OFFSET to change how high from the ground your players feet are... THIS FIXED ALL OF MY ISSUES... Don't worry about all the avatar stuff if it didn't work for you (As non of it worked for me)
Answer by markfrancombe · Feb 27, 2013 at 07:49 AM
Hey John!
Thanks so much for your suggestion, Ill check when I Get to work. In definately missing something when it comes to mechanim. I can see its use as a cool way to blend. But dont understand how its a replacement for animation generally. On this point, Do you know if its possible to use LOOSE anim clips, as In ones that Are NOT embedded In a FBX? I have a good collection of motions for My character In the legacy system, but they are not attatched to meshes.
As a non coder, I am struggling too with the Control script, only having the BotControl script from the original tutorial for mechanim. Im hoping to rebuild this In PlayMaker soon, so I can implement MY needs. as that tutorial has picked a very strange method.
cheers for your help
Mark
Hey $$anonymous$$ark,
No problem, I hope that it solves your issue when you get back to it.
Regarding your other inquiry, I'm afraid I don't know! Im very new to $$anonymous$$ecanim as well, and any wisdom I have, I have stumbled into accidentally :P.
If I happen to stumble into it, I will be sure to let you know.
John
Answer by Alexandros1313 · Feb 27, 2013 at 01:20 PM
Hi Mark, I've a similar problem. I've a charater animated by mecanim that should fall using ragdoll (so I've to deactivate mecanim during the fall). When the character impacts with ground, it works fine, but when animator is disabled completely, the character falls in the ground till his weist, like in your pics.
$$anonymous$$aybe Johns suggestion will work for you? Im having to work on something else right now, and im not sure when Ill get back to this problem, and I have to admit that in the meantime Ive gone back to using the legacy system. I would really like to get to the bottom of this, as I dont want to suddenly find that system is depreciated, but for now, working with anim clips on a character triggered by code, without going thru Animator is a dream... sorry!
I would still like to know whether a loose anim clip can be used in Animator at all, or do they always have to be embedded in an FBX. I have lots of little anims that work for all my characters, but they are JUST anim clips.
For example, I used to tweak animations right in Unity, just by copying the anim clip and fixing it.. but now it seems that all animatin has to be done OUTSIDE of unity and imported as FBX, how can this be better?
As I said, Im sure Im just missing something!
$$anonymous$$Ark
Your answer
Follow this Question
Related Questions
Mecanim Rigidbody character slope limit issue 1 Answer
How Character controller can push another character controller? 0 Answers
RigidBody Character Controller Bug 0 Answers
Mecanim Inherit Velocity of previous animation? 0 Answers
When jump my character controller model it goes out of collider 0 Answers