- Home /
Can I use mecanim to rig my character for ragdoll effect?
Hello world, I am very unfamiliar with the whole visual side of things. I do have some experience with sprites. I've messed around with 3d modeling and rigging in Blender, with some success. I know how to rig a character in Blender but i am wondering if I can rig it in Unity, more specifically mecanim. I have looked around for this answer but it's all a little confusing to say the least. In the ragdoll wizard page it says characters need to be rigged in an outside program, and that an instance of that character needs to be created to apply ragdoll effects since the original is unusable. Then I'm reading the mecanim page and it appears I can send an unrigged 3D model and rig it via mecanim. In the physics component drop down list there's a joint called "character joint" which apparently has constraints to allow accurate elbow and knee rotations, which is what I was worried about. Could I use character joints and mecanim bones to rig my characters? Does mecanim even have bones? Any help will be greatly appreciated.
Answer by Firedan1176 · Dec 21, 2014 at 10:01 PM
Mecanim is what's used for animations in Unity, and I think you're just looking for the Ragdoll Wizard (as you've posted).
The Ragdoll Wizard isn't any more than to make your life easier. It just uses code and some fancy math to create a ragdoll based off of your character. With that being said, you don't even need the ragdoll wizard. But it saves time and the headache (like the Character Controller! You don't have to make it yourself). In the Ragdoll wizard, you need to have the joints from your character:
Because you need to tell Unity where your character's joints are AND how it moves the mesh, you need to have a rigged character. You can't just slap down a mesh and expect it to work, it needs a rig.
When it says an instance, it simply means just drag your character into the game from your Assets, open the Ragdoll Wizard, and drag in the bones (the rig's joints) which corresponds to the names in the wizard (place the left foot joint in the "Left Foot" blank, etc.). After that, you can simply click create and it will just place those Character Joints on your character to make it move around like a ragdoll.
If you need any more help, there are some tutorials on YouTube, such as: https://www.youtube.com/watch?v=dCwNaE_eVsM
You can also post a comment if you need help or are still confused.
I think I got it. I'll have to drag bones from Blender into the corresponding slot, and apparently only humanoid characters will work. I have a jigglypuff model i made because it was easy to make, but she doesn't have elbows. I guess I cant use the ragdoll wizard with that particular model. Or say I have a spider model with the joints per arm. Looks like I wouldn't be able to use the ragdoll wizard for that either.
The wizard won't work for non-humanoid models, no, but like @FireDan1176 said, all the wizard does is automate the process of assigning rigidbodies and colliders to the various joints in the model - you can do that manually and the end result will be identical.
I've used Ragdoll Wizard for 6 legged beasts. You just can't add all the limbs. The be honest though, it looks just the same.
Interesting @meat5000 , how strict is ragdoll? What about the jigglypuff character with fewer joints than a standard humanoid?
I've seen people ragdoll four legged animals as they have the same amount of joints. You've provided an answer for more than humanoid joints but what about lower?
"Ragdoll" just means let the mesh be moved by a set of individual, connected rigidbodies (I.e. the "joints") with movement deter$$anonymous$$ed by the physics engine. You can set as many joints (and how they're connected) as you want.
Answer by Mmmpies · Dec 21, 2014 at 10:01 PM
You need a properly rigged model to work in mecanim as well. There are some auto rigging software out there, I know Mixamo Fuse allows 1 free rigged character per week but it is an up front cost. Although not a massive cost and on offer at the moment on the asset store.
If you can rig in Blender then you should be OK doing it yourself but AFAIK mecanim needs a rig on the humanoid you import. It can then strip out the animations and put them on any other humanoid which I think is where you're getting mixed up. It auto selects the joint points so you can retarget animations to any humanoid.
Not used ragdoll yet but intend to and you need it properly rigged if it works in mecanim then it'll work in ragdoll but if you have a non-rigged model you're stuck with both.
See this for ideas rigging
So best I can advise is Mixamo Fuse at the moment. There may be others out there too.
Had to choose the other answer just because it goes a little more in depth. Thanks for the help though, I gave you a thumbs up. If I could mark two answers as correct I would.
No complaints @superluigi thumbs up is better than I get for far more accurate explanations - thanks
Your answer
Follow this Question
Related Questions
IK and ragdoll... and animation problem 1 Answer
Does mecanim humanoid work with spline IK 0 Answers
Animation State is causing ragdoll to freeze 0 Answers
Unity Model Clothing 0 Answers