Box entity sometimes passes through triangle entity.
Posted: Wed Mar 02, 2011 10:26 pm
If I fire a box entity at a triangle entity then the box will sometimes not collide with the triangle entity and pass straight through it.
My box is setup as follows:
The triangle is setup as follows:
Here is a video demonstrating this phenomenon:
http://screencast.com/t/4TwrUyu7
My box is setup as follows:
Code: Select all
box = new Box(position, size, size, size, 1);
box.PositionUpdateMode = PositionUpdateMode.Continuous;
Code: Select all
triangles[0] = new TriangleShape(); // 0, 1, 2
triangles[0].VertexA = p0;
triangles[0].VertexB = p1;
triangles[0].VertexC = p2;
triangles[1] = new TriangleShape(); // 1, 3, 2
triangles[1].VertexA = p1;
triangles[1].VertexB = p3;
triangles[1].VertexC = p2;
triangles[0].Sidedness = BEPUphysics.CollisionShapes.ConvexShapes.TriangleSidedness.Counterclockwise;
triangles[1].Sidedness = BEPUphysics.CollisionShapes.ConvexShapes.TriangleSidedness.Counterclockwise;
http://screencast.com/t/4TwrUyu7