This project has moved and is read-only. For the latest updates, please go here.

nooby question, please help

Jan 28, 2009 at 8:04 PM
Hi all, i am very new to farseer physics engine so i am experiencing some difficulties.

I am working on a 2d top-view car racing game. I have recently find the best values for simulating a good looking car dynamics but when i compiled my code, i have encountered a problem on collision. I tried to decrease dt value sended to update function. But now i sould change all the values like mass, forces etc. to get the results i want. How should i change my values due to dt value?

For ex:
mass = 1000;
force applied to body = 1100;
friction force = 800;

when dt=1

now i am sending 0.016 to update function
Jan 29, 2009 at 1:59 AM
Your dt should really shouldn't change dynamically by your own code, all you need to do is pass in GameTime value like so:
                      float elaspedTime = gameTime.ElapsedGameTime.Milliseconds * 0.001f;

 in your update method. 
Jan 29, 2009 at 10:38 AM
Edited Jan 29, 2009 at 1:02 PM
Thanks for your answer, but when i changed dt value as you said, my cars acceleration time has decreased. I want my car gets to the top speed in the same time as in my first values. For example, with the values i gave above, my car gets to the top speed 16 in 53 frames. As you see the acceleration of the car is 0.3f. But when i changed dt value everything is changing. I want my car gets to the top speed in the same 53 frames. Meanwhile what does this dt value show?timesteps the physics engine compute?
Jan 29, 2009 at 10:17 PM
Keep that dt value fed by GameTime, if you want to increase your acceleration, then decrease the Force applied since Force = mass * acceleration.