Apr 14, 2012 at 10:27 PM
Edited Apr 14, 2012 at 10:56 PM
The simulation runs smooth at 60 fps both on the emulator and the Windows Phone device and the body update time is ~ 5 - 20 during normal simulation. The problem appears when i attempt to move some kinematic bodies (about 30 of them) by setting their LinearVelocity.
When i do that, the body update time skyrockets to 200 - 300.
Can i assume that it's due to the limited processing power of the device or am i doing something completely wrong?
This is how i move the kinematic bodies:
const float strength = 0.5f;
var bodyPosition = ....
var positionDelta = bodyPosition - destination;
var velocity = (positionDelta / timestep) * strength;
Body.LinearVelocity = -velocity;
One solution might be to drop using Farseer bodies and only draw the objects, since i can predict where they're going...
EDIT: I should mention that this is while using debug view, haven't tried by only drawing the textures yet.