Skorche
2005.09.21, 08:04 PM
I know there are a few people on this board that have implemented some pretty good physics. What is a good way to estimate good collision points?
Many articles say to use the average of the penetrating vertices, but I'm using SAT to determine collisions. So if the SAT test registers a collision, but there aren't actually any penetrating vertices, that would be bad.
I've also seen that some simply apply an impulse at every vertex that is penetrating, but would you have to divide the impulses by the number of impulses, or would applying several full strength impulses be the correct thing to do? The impulses are also really expensive to compute, so applying many seems like kind of a bad idea. And what do you do if objects are colliding but there are no penetrating vertices?
What I've been doing is trying to get a good approximation of the centroid of the collision area. Unfortunately, this tends to make a box laying on the floor vibrate slightly because it ends up overcorrecting the motion of the body to satisfy the collision at the single point. Will applying impulses at all of the colliding points fix this?
Many articles say to use the average of the penetrating vertices, but I'm using SAT to determine collisions. So if the SAT test registers a collision, but there aren't actually any penetrating vertices, that would be bad.
I've also seen that some simply apply an impulse at every vertex that is penetrating, but would you have to divide the impulses by the number of impulses, or would applying several full strength impulses be the correct thing to do? The impulses are also really expensive to compute, so applying many seems like kind of a bad idea. And what do you do if objects are colliding but there are no penetrating vertices?
What I've been doing is trying to get a good approximation of the centroid of the collision area. Unfortunately, this tends to make a box laying on the floor vibrate slightly because it ends up overcorrecting the motion of the body to satisfy the collision at the single point. Will applying impulses at all of the colliding points fix this?