1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help finding time between two frames for collision detection

  1. Feb 13, 2010 #1
    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!
     
  2. jcsd
  3. Feb 13, 2010 #2

    DavidSnider

    User Avatar
    Gold Member

  4. Feb 13, 2010 #3
    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?
     
  5. Feb 13, 2010 #4
    Nevermind! I didn't see the other 7 pages on there! Haha.
     
  6. Feb 13, 2010 #5

    A.T.

    User Avatar
    Science Advisor

    Sure, you could define a line-fixed coordinate-system, and do your collision test threre.
     
  7. Feb 13, 2010 #6
    Thanks, I'll try that later tonight. Thanks for the link again.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook