Hey, so I should preface this message with a congratulations on what seems to be a pretty impressive port on an already impressive library.
However, I've had a couple of problems with getting my first application with this working. So essentially what I've done is I've created a load of Balls using CircleDef and put them inside a box. The four walls of the box are static axis aligned Rectangles (PolygonDef.SetAsBox). The Balls have a density of 1, and both the Balls and the Walls have a restituation of 1. The balls start within the box and have a random Velocity vector (between -2.5 and 2.5 in both X and Y). Gravity is (0,0).
So they all bounce mostly fine, I'm actually running this in XNA and so I'm drawing the balls on the screen in the Draw method, so I can watch them and they do look like they are mostly working. The issue is that they occasionally stick to the walls (they only seem to do this rarely and I haven't been able to tell the conditions for this), and also they all speed up. To monitor the speeding up I have created a thread that once a second just prints the total kinetic energy and this confirmed that they definitely are speeding up.
A bit more information, as I said I'm running this in XNA with IsFixedTimeStep = true, with world.Step() in the Update method, with dt as (float)(TargetElapsedTime.TotalSeconds).
It's highly possible that I am just doing something silly somewhere, if so some pointers in the right direction would be groovy.
However, I've had a couple of problems with getting my first application with this working. So essentially what I've done is I've created a load of Balls using CircleDef and put them inside a box. The four walls of the box are static axis aligned Rectangles (PolygonDef.SetAsBox). The Balls have a density of 1, and both the Balls and the Walls have a restituation of 1. The balls start within the box and have a random Velocity vector (between -2.5 and 2.5 in both X and Y). Gravity is (0,0).
So they all bounce mostly fine, I'm actually running this in XNA and so I'm drawing the balls on the screen in the Draw method, so I can watch them and they do look like they are mostly working. The issue is that they occasionally stick to the walls (they only seem to do this rarely and I haven't been able to tell the conditions for this), and also they all speed up. To monitor the speeding up I have created a thread that once a second just prints the total kinetic energy and this confirmed that they definitely are speeding up.
A bit more information, as I said I'm running this in XNA with IsFixedTimeStep = true, with world.Step() in the Update method, with dt as (float)(TargetElapsedTime.TotalSeconds).
It's highly possible that I am just doing something silly somewhere, if so some pointers in the right direction would be groovy.