What is the difference between:
- a rigidbody with isKinematic checked and a collider on it
- an object with just a collider
Cheers,
-Jon
What is the difference between:
Cheers,
-Jon
You can suddenly turn rigidbody control on and off. This is useful for animated characters with ragdoll support.
You can attach joints to kinematic rigid bodies.
Do you have a working example of this we could see? I remember seeing a demo video on your site that showed a character getting knocked flying by a large block. Knowing how you did that would be useful.
I am working with arton to make a animated character demo.
Essentially, you just add a lot of hinge joints to the bones which you want under rigid body control. Don’t forget to setup the connected Body property.
Then you setup the spring so the model has a tendency to snap back to its rest position.
The widget monkey was done in the same way.
This sounds good. Looking forward to seeing it.
Hey Joachim - I’m working on a ragdoll of sorts. I have a bunch of body parts (primitives) setup and have turned ‘isKinematic’ on via the check-box but I need to figure out how to turn it off inside a script. Any ideas?
Thanks!
psx
Oops. I added the isKinematic flag to the scripting interface. Will be in 1.1.1.
Sorry about that.
Sounds good! Thanks for the info.
Just out of curiousity, how did you guys do the ragdoll demo movie? Is there another way to turn the flag off at runtime or another way to get the same effect?
psx
It had good old hinge’s with springs attached so it could stand all by itself pretty stable.
So it just didn’t have any animations on it.
Thanks again! I’m giving it a go but don’t really understand how the springs work.
What I’m doing now is putting a transparent wall behind my character. Then when I need to move him I turn isTrigger on for the wall so he falls right through it. Seems to work fine. Let me clean up the project and then I’ll post it if you (or anyone) wants to take a look.
psx
Springs simply give your character stability.
The spring trys to go to the targetPosition, in the case of a character we set the angle to be zero and just let him start out in a good resting position.
The spring then exerts forces to make it go back to the rest position.
Put the character in a nice looking rest position in the scene
Make all springs on all hinges have values like 10 for the spring, 5 for damping. Target angle should be zero in this case.
Hit play and watch him fall. Then tweak the parameters so it looks right.
Until this is added is there any other way to toggle the Is Kinematic flag on a rigid body via scripting?
I’m trying to create a human figure for my game and would like to be able to switch to ‘ragdoll mode’ when it’s dead, so it can be flung aroud the place. At the moment the figure is a model with separate meshes for arms, legs etc. Each mesh has a rigid body component. If I make sure every rigid body has the Is Kinematic flag ticked the figure stands fine. Obviously, removing the Is Kinematic flag means the figure collapses. Am I correct in assuming:
As long as the Is Kinematic flag is checked I can use any animations I create as part of the model. In other words, my figure is just like any other model imported into Unity
If there is a way to turn on the Is Kinematic flag for each rigid body via scripting I can then turn my pre-animated figure into a ragdoll which is directly affected by the game physics.
Sorry if this is re-hashing things people already know. I’m still in the learning phase. Any tips are appreciated.

I am not aware of a way to workaround it right now.
1.1.1 is coming out real soon.
Ok. I’ll hang till then.
What would you say is the best way to create game characters?
1 - Use a single mesh model posed and animated using bones in your 3D app, or:
2 - A model split into separate meshes for arms, legs etc with all the pieces joined together in Unity using hinges?
As far as I understand option 1 would mean I can get nice smooth deformations on the character joints, but can’t make the whole thing act as a ragdoll because there’s nothing to join together using hinges.
Option 2 means I can attach the arm to the shoulder, lower leg to upper leg etc. using hinges, but I could end up with situations where gaps between parts of the character is quite obvious. E.g. an arm bending a lot to show a gap at the elbow between the upper and lower sections.
Some games such as Halo seem to use option 1 and have nice ragdoll effects. However it looks like more advanced engines such as Unreal 3 use single mesh models but still have ragdoll physics. Are they using joints on the underlying bones of the character? Is there a way to do this in Unity?
Just thinking out loud.
Most definately use option 1.
When you create a skinnned mesh, you also have to create bones for it in your art program.
Those bones translate to a Transform hierarchy in unity.
The Transform hierarchy then drives the skinned mesh. (You can test this easily by just moving the transforms around and watch the skinned mesh deform)
Then you attach the joints and rigid bodies to the transform hierarchy that was created from the bones which you made in your art program.
So yes, you can do ragdoll physics on a skinned mesh. And it is just as easy to setup as setting up a ragdoll with seperate meshes.
I created my characters in Cinema 4D and have started boning them. When I export to FBX and bring them into Unity I don’t see any sign of the bones, just the polygon mesh. Can any other C4D users explain what I should be doing?
Thanks.
From my brief experience with the humanoid model, the bones were not visible in the 3d view, but were accessible through one of the hierarchy views. Sadly my trial has expired so I can’t check to see which window they were in. I want to guess the main hierarchy window.
psx