I'm working on a racing game where the vehicle is normally colliding with pretty much anything/everything in the level (ground, walls, jumps, etc). So I can't use normal collision detection methods to check if the vehicle has actually "crashed" and not safely glanced off of something.
I think the solution is to check for sudden changes in velocity, but I'm not sure how to do it. I'd like to check if the velocity falls below a specific minimum within a specific amount of time. Any ideas?
asked Mar 03 '10 at 01:13 AM
You could compare the magnitude of the velocity of the previous frame with the magnitude of the velocity of the current frame (or rather, the sqrMagnitude, which is faster):
answered Mar 03 '10 at 01:52 AM