Sign in to follow this  
Rob Loach

Time-Based Collision Detection

Recommended Posts

Rob Loach    1504
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
xissburg    204
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
ToohrVyk    1596
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this