- Home /
Mass setting Rigid bodies to Is kinematic
Hey all,
I have been handed a model to act as a building in the level I am coding. I have set the rigid bodies and mesh collider and then made each 'is kinematic'. Yay! the character no longer runs through the walls!
But there is 2500 different polys making up this model. Highlighting them all and then ticking the box only effects one and applying it to the larger model rather than the polys has no effect.
Is there a way to mass set them to be is kinematic? Doing it one by one is taking a long time.
Thanks in advance
Answer by jonas-echterhoff · Jan 21, 2011 at 09:19 AM
You should not need rigidbodies on static building geometry (in fact this is going to totally kill your performance). MeshColliders should be all that is needed. And those can be generated by the model importer, check the "Generate Colliders" checkbox on the asset.
Answer by efge · Jan 20, 2011 at 04:00 PM
Take a look at the wiki: MassSetMaterials
Maybe you can modify this script like this:
@MenuItem("Scripts/Mass Set isKinematic")
static function MassSetisKinematic() {
Undo.RegisterSceneUndo("Mass Set isKinematic");
for (var obj : GameObject in Selection.gameObjects) {
obj.rigidbody.isKinematic = true;
}
}
Your answer
Follow this Question
Related Questions
Kinematic rigidbodies 1 Answer
Child Rigid Body collision problem 2 Answers
Stopping character from walking on grass 0 Answers
Making a Character Controller 1 Answer
Gravity Scale Zero or Kinematic? 1 Answer