Jump to content
  • Advertisement
Sign in to follow this  
Timjanmannen

Newton Game Dynamics behaves wierd

This topic is 4370 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, im currently making a project with Irrlicht and Newton Game Dynamics. I'm using the timer object that is accessible from my IrrlichtDevice to get the delta-time to pass to NewtonUpdate. I noticed that newton behaves wierd, for example a freely falling object falls at a somewhat constant speed, which varies up and down a little, but it should accelerate and go faster all the time =S When i changed the delta-time source to GetTickCount it worked fine. I noticed that the smallest delta-time i could get with GetTickCount was around 15 ms(It returned the same value until ~15 ms had passed, anybody know why?) while the irrlicht-timer was capable of delivering delta-times of 1-2 ms. I then made the least acceptable delta-time 15 ms, and it behaved quite normal, so my questions are these: Does anybody knoq why NewtonUpdate behaves wierd with to small detla-time? And does anyone know why GetTickCount's delta-time is ~15 ms? Thanks in advance Pierre

Share this post


Link to post
Share on other sites
Advertisement
I don't know whether Newton does this for you, but mabye you should keep each step size the same length. This means that each update will have the same delta time, but might be run more or less than once every frame, depending on the framerate. This *might* make it work better.

Share this post


Link to post
Share on other sites
Quote:
Original post by Timjanmannen
And does anyone know why GetTickCount's delta-time is ~15 ms?


Because that is the resolution of the timer - it only measures to about that accuracy. If you need better accuracy, use a different timer.

Share this post


Link to post
Share on other sites
Actually, this is because newton quantizises the delta time that is passed to NewtonUpdate. You can get normal behaviour if you just update newton with a constant time but just call the function when that time has passed. there's lotsa info on that in the newton forums!

Share this post


Link to post
Share on other sites
My account at the newton forum is currently disabled and my email banned because i didn't post anything myself(Which is why i'm asking ere on gamedev :)). I recently sent an email to the admins and asked them to enable my account again.
Thanks for the replies, i think i get it now =)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!