collision detection 2

| No Comments | No TrackBacks

There is still some flaw with my code before, I examined the code very carefully and found that I need to store the non-collision state, and restore it after one collision.In other words, I need to find the exact colliding time. If I don't, if I use the already collided time, the behaviour is very weird.

The modification that I made, was to use a set of variables to store the non-collision state just before collision, or it can be specified as a state buffer.

the pseudcode is:


updateState()
{
      if  not colliding
       then store the state
      if colliding
        restore the state and execute the collision response
}

but there is a problem with low update rate computers, that is if the car's speed is too fast, the stored state's position might be a little far from the current state, if you restore it, there might be Temporal aliasing. which is not good....

anyway, I will continue the study on this, and update what I get.

No TrackBacks

TrackBack URL: https://blogs.psu.edu/mt4/mt-tb.cgi/58788

Leave a comment

About this Entry

This page contains a single entry by HUAIDONG WANG published on April 6, 2009 6:05 PM.

items to complete was the previous entry in this blog.

SimpleRace beta test version release is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Subscribe

Powered by Movable Type 4.23-en