public virtual void Enable(bool bImmovable, float mass) { //set whether the object can move Body.Immovable = bImmovable; //calculate the centre of mass Vector3 centerOfMass = SetMass(mass); //adjust skin so that it corresponds to the 3D mesh as drawn on screen Body.MoveTo(Transform3D.Translation, Matrix.Identity); //set the centre of mass Collision.ApplyLocalTransform(new Transform(-centerOfMass, Matrix.Identity)); //enable so that any applied forces (e.g. gravity) will affect the object Body.EnableBody(); }