• Advertisement
Sign in to follow this  

Physics update lag problem [SOLVED]

This topic is 3166 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

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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


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

  • Advertisement