hello, sorry about my English. First, this is my code:
----------
Rigidbody rigid;
void start()
{
rigid = gameObject.AddComponent();
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.
↧