I'm having trouble implementing collision detection/response when two objects intersect in more than one point. Currently, for example, when checking if a box (oriented bounding box) collided with a scene face:
Code: Select all
if (box.intersects(face_plane))
{
contact_point = face_plane.closest_point(box.position);
if (face.contains_point(contact_point))
{
// we have a contact
}
}
For example, http://66.253.147.225/images/physics.jpg
If I initialize the box in the shown pose, it stays in that pose, and doesn't rotate to fall correctly on the floor.
I'm using the contact handler I posted in:
http://continuousphysics.com/Bullet/php ... .php?t=257
Any help is appreciated. Thanks.