Help finding time between two frames for collision detection

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
5 replies · 3K views
blainiac
Messages
50
Reaction score
2
Hey everyone!

I programmed a verlet physics engine that works great. I got to the collision detection and response and it's been frustrating to say the least. I've tried tons of different ways, but no cigar.

The collisions themselves are between points and lines between points. These lines make up different shapes that move around in the physics engine.

Since the game runs at 60Hz, the points can simply hop over a line (which can be moving too). I'd like to know if there's a way to see WHEN between those two frames they actually collide. (so if the first frame, F0.0 had no collision, and F1.0 had a collision, F0.66 would be where inbetween they collided)

Here's a pic to show what I mean...

http://nullium.fileave.com/pointlinecollide.png

Thank you so much!
 
Physics news on Phys.org
http://www.gamasutra.com/view/feature/3383/simple_intersection_tests_for_games.php
 
Thanks for the link. I haven't looked to deep into it, but could I make a 'stationary' plane by making movement relative? Like, from the 'line's' point of view?
 
Nevermind! I didn't see the other 7 pages on there! Haha.
 
blainiac said:
Thanks for the link. I haven't looked to deep into it, but could I make a 'stationary' plane by making movement relative? Like, from the 'line's' point of view?

Sure, you could define a line-fixed coordinate-system, and do your collision test threre.
 
Thanks, I'll try that later tonight. Thanks for the link again.