- Home /
My Mecanim-Generic is screwing with the gravity
I am revisiting the same question I have asked, and unfortunately, I am no where near solving it.
To cut it short:
Mecanim Humanoid works perfectly with gravity (rigidbody), the character dropped to the floor when it is in mid-air, and the character can move forward freely. (I am using the example scene provided by Unity)
Mecanim Generic (at the very least, in my case) doesn't work with gravity, I always get either of these 2 results (plus some no-so-different variations):
- The character is moving forward, but it is stepping on air, the gravity (rigidbody) is not working - The gravity works, the character drops down when it is in mid-air, but it no longer moves forward. The animation is working, just that the gravity kind of interfere with the root bone and prevent it from moving.
This is the package I am working on to solve this problem, I think the key to solve this is to juggle between the mecanim-settings and rigidbody-settings, but I ran through a lot of combinations and I am no where near getting it to work:
https://www.dropbox.com/s/dsnd2w5tsvnnrcc/MecanimGeneric.unitypackage
I hope that what I am facing is just a setting problem, not a fundamental-behind-the-scene-and-I-cant-do-a-thing-about-it-at-all thingy. Give the package a run and see if you can figure it out.
Answer by rgeeman · Jul 19, 2013 at 01:46 PM
I don't think this has anything to do with Mecanim "Generic" versus "Humanoid".
In your animations you should make sure that the "Root Transform Rotation" and the "Root Transform Position (Y)" are both set to "Bake into Pose". This worked for me.
you should make sure that the "Root Transform Rotation" and the "Root Transform Position (Y)" are both set to "Bake into Pose"
The same problem persists despite that I follow the setting you recommend, I must have missed something here.
This worked for me.
Do you mean it works for you previously in other project? Or it works when you test it with the package I provided? One way or another, can you send me a .unitypackage with working example? I almost give up on this one, thanks a lot!
Answer by SteelX · Jan 17, 2014 at 04:51 PM
I had the same problem after struggling with all possible solutions(including putting a high gravity, i have to discard this one due to shooting problems). the solution was pretty simple when animation type is generic in rig tab , just change select root node from none to the appropiate mesh body.