Physics update lag problem [SOLVED]
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]
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement