First I wanted to say great work on JigLibX - we got the system integrated into our in-house game engine in no time. :)
Unfortunately we've run into a number of problems with spheres passing through our static TriangleMesh levels when traveling more than a few MPH.
We've verified that both the meshes and spheres are setup properly and in the correct spaces. And the entire game works correctly if the player movement is slowed down to a crawl. But moving at normal speeds the player sphere (think hamster ball) passes through meshes.
Another problem we're seeing is that spheres pushed with an impulse slide across the mesh level instead of starting to rotate due to friction (though friction is slowing the spheres down).
Here's how we setup our physics environment:
PhysicsSystem _PhysicsSystem = new PhysicsSystem();
_PhysicsSystem.EnableFreezing = false;
_PhysicsSystem.Gravity = Vector3.Down * 40.0f;
_PhysicsSystem.SolverType = PhysicsSystem.Solver.Normal;
_PhysicsSystem.CollisionSystem = new CollisionSystemSAP();
For each XNA game Update:
And for the physics objects we use:
Body _Body = new Body();
_CollisionSkin = new CollisionSkin(_Body);
_Body.CollisionSkin = _CollisionSkin;
Matrix mat = world;
mat.Translation = Vector3.Zero;
_Body.Position = world.Translation;
_Body.Orientation = mat;
_Body.Mass = mass;
Then add either a sphere or triangle mesh primitive to the skin depending on the object type.
Are we doing something wrong, why is our JigLibX implementation so unstable?
Thanks for the help!