Aligning CollisionSkin and Body?!

Jan 24, 2008 at 12:19 PM
I'm having trouble to understand folowing lines in BoxObject.cs and SphereObject.cs. Iy I understand this right, body object must be moved to align with It's collision skin? Why is that so?

//BoxObject
Vector3 com = SetMass(1.0f);
body.MoveTo(position, Matrix.Identity);
collision.ApplyLocalTransform(new Transform(-com, Matrix.Identity));

// SphereObject
Vector3 com = SetMass(1.0f);
body.MoveTo(position + com, orientation);
collision.ApplyLocalTransform(new Transform(-com, Matrix.Identity));