Collision detection with multiple contact points
Posted: Wed Mar 08, 2006 6:04 am
Hi,
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:
The problem with this is that I only get one contact point, even though the box might have been hitting multiple points on the face.
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.
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.