Isn't there a way, to force BEPUphsyics to show what it is doing? I am here with my existing XNA project, starting to put in BEPUphysics, but I am not seeing what it is doing.

Take my model for instance. I think I made a StaticMesh here:

public BEPUphysics.Collidables.StaticMesh PhysicsMesh;
public Space space;
private Hero _hero;

public override void LoadContent()

   space = new Space(); 
   Vector3[] vertices;
   int[] indices;
   TriangleMesh.GetVerticesAndIndicesFromModel(_model.getCoreModel(), out vertices, out indices);
   PhysicsMesh = new BEPUphysics.Collidables.StaticMesh(vertices, indices, new AffineTransform(new Vector3(0, -40, 0)));

   space.ForceUpdater.Gravity = new Vector3(0, -9.81f, 0);

That's the only thing I made BEPU-Wise in my game. All other models don't have physics attached to them.

But, like I said. I see nothing when the game is running. Only my model, not falling, not doing anything.

I would like to see the full thing BEPU is doing in runtime.


1 Answer 1


Drawing bounding boxes is a good solution, I have found. When I integrated BEPU into my engine I added code to do two things:

  1. Draw the bounding box of the model in a certain color.

  2. Draw the bounding box of the physics objects in another color.

This really helped me to find all the various issues between the two*, and makes the positions quite clear. You'll have to do a bit to construct a bounding box from the static mesh, but it isn't too bad.

  • Importantly, the origin point of the static mesh made from your model will likely not be the same as the origin of the model. Rather it will be the 'center' of the object, vs the origin assigned in the modeling program. You'll likely need to figure out the offset between the two and draw the model with the offset so it is at the proper position per the physics object.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .