[ODE] collision matrix

Bram Stolk bram at sara.nl
Sat Apr 22 07:44:28 MST 2006


 
>There is a formula for finding the smallest distance between the two
>(center) lines (and the points on the lines where the shortest
>distance is. (this can even be done for any N-dimensions) If the
>distance is less than the sum of the radius of both cylinders, and the
>closest points are within the length of each cylinder, it's a hit.
>for a capsule, check the distance from the the center line to the end
>of the other cylinder.

No, this is not a correct test.
 
Just draw some scenarios on paper, and you will see why.
There are so many cases where this is not true.
 
E.g. two cylinders stacked on top of eachother have dist 0
between center lines. Heck, a cylinder floating directly
above another, a million miles away has 0 dist between
center lines.
Even if you take dist between linesections it does not hold.
 
capsule vs capsule is very easy. cyl vs cyl is very hard.
 
Also the sum of radii is bogus: just take the case where
a cylinder is resting with its curved surface onto the
cap of anoter cylinder.
 
  bram
 
 
 
 



More information about the ODE mailing list