All I wanted to do was move the centre of mass of a rigid body, but it wouldn’t work unless I put it in an update, like this.
using System.Collections;
public class CoM : MonoBehaviour {
void Update() {
rigidbody.centerOfMass = new Vector3(0, 0, -2);
}
}
I just don’t see why you can’t put it in a custom method like “void MoveCenter()”.
Btw I’m learning Unity3d and C# at the same time.