Jump to content
  • Advertisement
Sign in to follow this  
Rob Loach

Time-Based Collision Detection

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

I've implemented time-based movement into my system, but ran into a problem when it came to collision detection and response. Considering that every object in the system moves at at variable speed depending on how fast the system is running, it's hard to tell if objects collide when they pass over each other in between frames. Does anyone know how to "predict" collisions for time-based movement?

Share this post


Link to post
Share on other sites
Advertisement
the collision prediction depends a lot of the kind of objects you are computing the collisions. It can be too complex or not depending of the geometry of your objects. You can try using substeps. It will make your application slower but it can work fine in certain limits of velocity. So, divide your timestep by the number of substeps and integrate-check collisions 'substeps' times(substeps is a natural number(unsigned int)).

Share this post


Link to post
Share on other sites
I get the positions of my two objects, plug them into the correct formulas for bounding sphere collisions (not very hard to derive), and get back the time of first collision between them. I then wait until that time to check for collisions again, using the more precise hull information instead of sphere collisions.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!