Original Post
Hi, I'm working on collision detection and response between two verlet bodies (specifically 2D boxes). Right now I'm basically testing to see if a vertex intersects the contraint of another box. I then move the vertex half the shortest distance to the contraint and the 2 vertices that make up the contraint the same distance in the opposite direction (this basically ignores the point of intersection and the masses of the boxes, but it works fine for testing purposes). I'm having a problem testing if the vertex intersects a contraint. I've tried using the current position and the old position to do line segment-line segment collision. A collision is detected, but the response doens't work out as it should (the boxes intersect each other). I ended up using the current position and the center of the box for the line segment, which actually works fine. I would just continue using this method, but I'll run into problems when I implement ragdolls since they have no "center". I'm still confused on why using the old position isn't working (I'm probably missing something really obvious >_>). Also, I tried using the position of the particle next to the offending vertex as the endpoint of the line segment, but that didn't work either, and the boxes would be projected off each other extremly fast and would sometimes even collapse into an L. Thanks for any help.