Physics update lag problem [SOLVED]

Started by
6 comments, last by h4tt3n 14 years, 10 months ago
Rather than explain the problem again I posted a blog article about the problem. Let me know if you can help. Physics update lag problem Thanks in advance. James [Edited by - NotTheCommonDose on June 22, 2009 2:11:52 PM]
Advertisement
Hi there,

THis problem should go away if you first iterate through all objects and find the forces acting on them and then iterate through them again, updating their position and velocity. From what I've read in your blog it seems like you do it differently.

Cheers,
Mike
That doesn't appear like it will work because how will the engine know to apply forces to an object if it hasn't updated the applying object's new position and velocity yet and found the new collision?
I'm looking into having a central registry of all the forces going to be applied and calculate them all after the game update cycle. But this appears to have the same problem.
Quote:Original post by NotTheCommonDose
That doesn't appear like it will work because how will the engine know to apply forces to an object if it hasn't updated the applying object's new position and velocity yet and found the new collision?


Hmm... there's a chance I've misunderstood you, but if you do like I suggested before, the engine doesn't "have to know" wether an objects state has been updated or not - because ALL objects are updated before any new forces are applied. And likewise ALL forces are updated before any new position / velocity updates. Afaik this is how all force based physics simulation work.

If I'm totally in the woods here, please explain in more detail how your engine currently works. This'll make it easier for everyone to suggest good solutions to your problem :-)

edit: I've done a lot of very advanced force based physics sims over the years and never encountered the problem you mention. Imho no central register or anything like that is needed.

Cheers,
Mike
I will most certainly try it. Thanks for your input. I'll let you know how it goes.

James
This appears to have fixed my problem. Thanks for the suggestion!

James
You're welcome! Good luck onwards :-)

This topic is closed to new replies.

Advertisement