- Home /
Question by
sefa · May 16, 2014 at 09:00 AM ·
rigidbodytransformlocalposition
Code does not work
where the error am I doing?
var CenterOfMass : Transform;
function Start (){
rigidbody.centerOfMass = Vector3(COM.localPosition.x * transform.localScale.x, COM.localPosition.y * transform.localScale.y, COM.localPosition.z * transform.localScale.z);
}
Error:"Assets/carcontrol1.js(23,34): BCE0005: Unknown identifier: 'COM'."
Comment
CO$$anonymous$$ object does not identified. First you have to specify that.
Answer by Joyrider · May 16, 2014 at 09:01 AM
You never declared COM. But you did declare CenterOfMass. So replace your indications of COM by CenterOfMass