i use the physics on my Windows Phone 7 game, and i apply physics to a 3D Models ?
here is code:
Code: Select all
BEPUphysics.StaticTriangleGroup.StaticTriangleGroupVertex[] vertices = null;
int[] indices = null;
StaticTriangleGroup.GetVerticesAndIndicesFromModel(this.Model, out vertices, out indices);
this.m_triangleMesh = new StaticTriangleGroup(new TriangleMesh(vertices, indices));
it smells like a bug. i want to find and fix this bug by myself, but i have no the source code, so i use Reflector tool to read the code, i find in TriangleMesh.AddMesh method:
Code: Select all
//......................
else
{
throw new System.FormatException("Unsupported vertex type in mesh.");
}
Microsoft.Xna.Framework.Vector3.Transform(vector3Arr, ref transform, vector3Arr);
vertices.AddRange(vector3Arr);
//......................
it worked fine! and like this: BTW, i want to speak more about this bug and the reason, but my spoken english is not good enough beacuse i am a chinese developer.