public override void Initialize() { var model = GetModelFromOwner(); if (model != null) { Vector3[] vertices; int[] indices; ModelDataExtractor.GetVerticesAndIndicesFromModel( model, out vertices, out indices); Mesh = new StaticMesh( MathConverter.Convert(vertices), indices, new BEPUutilities.AffineTransform( MathConverter.Convert(Manager.Owner.Location))); Mesh.Tag = Manager.Owner.ID; PhysicsEngine.AddStaticMesh(Mesh); } }