- Home /
Question by
cuongkimh4 · Feb 08, 2013 at 04:07 AM ·
rigidbodycomparemasscenterofmass
Compare rigidbody.centerofMass with go.rigidbody.centerofMass ?
hello, sorry about my English. First, this is my code:
Rigidbody rigid;
void start()
{
rigid = gameObject.AddComponent<Rigidbody>();
rigid.centerOfMass = Vector3.zero;
}
void Start()
{
gameObject.rigidbody.centerOfMass = Vector3.zero;
}
First, i think their are same, but when i used them. The result of first code is not my expected. Please help me to distinguish them. Thanks.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613092333im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to give dynamically add mass to a gameobject from volume(collider.bounds.size) and density 1 Answer
AddRelativeTorque results in incorrect angular acceleration (Maybe centrifugal force affects) 0 Answers
Can AddRelativeTorque take centerOfMass into account? 1 Answer
Compare Rigidbody.velocity 1 Answer
My jumping script has errors 1 Answer