- Home /
Question by
rupertcw · Feb 11, 2013 at 10:36 PM ·
modelmayafreezerotation
Freezing Rotation of part of model not freezing
I have a model consisting of 3 separate meshes and I'm trying to add Rigidbodies to each so I can freeze their rotation in different ways.
GameObject go = turret.transform.Find("Pivot").gameObject;
go.AddComponent("Rigidbody");
go.rigidbody.isKinematic = true;
Rigidbody freeze = go.rigidbody;
freeze.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ;
The issue is that when I run the game, the Rigidbody is correctly applied only to the Pivot of the model and the the Freeze Rotation boxes checked but the part STILL rotates in all dimensions.
Any indication as to why this is will be appreciated.
Comment
Your answer
Follow this Question
Related Questions
Model hands warped on import. 0 Answers
A node in a childnode? 1 Answer
Importing Maya Model to Unity3D 1 Answer
UV texture are dissapear in unity 1 Answer