Menu

#87 The ray-cylinder collision ignores most of the contacts with cylinder's caps

general
closed
None
1
2014-02-04
2012-12-14
Luc
No

The dCollideRayCylinder() routine (ray.cpp at line 500) handles only a very special kind of contacts with cylinder's flat caps, namely those generated by a ray whose origin lies inside the infinite cylinder (C <= 0) and such that the infinite ray line does not cross the dEpsilon-thick infinite cylinder (k < dEpsilon). Indeed, caps are only considered in the scope of the boolean test "if ( k < dEpsilon && C <= 0 )" (see line 589 of ray.cpp).
As a result, most of the collisions of a ray against cylinder's caps fail.

Discussion

  • Oleh Derevenko

    Oleh Derevenko - 2012-12-28

    Could you suggest a patch for this?

     
  • Joseph Cooper

    Joseph Cooper - 2013-01-14

    This patch fixes the issue. I've tested visually with demo_collision and it works for all cases I saw. I'm not sure about origin-on-edge or end-on-edge cases.

     
  • Bram Stolk

    Bram Stolk - 2013-03-06

    Tested the patch: works well for me.
    Applied it and committed revision 1929.

     
  • Bram Stolk

    Bram Stolk - 2013-03-06
    • status: open --> accepted
    • assigned_to: Bram Stolk
     
  • Daniel K. O.

    Daniel K. O. - 2014-02-04
    • status: accepted --> closed
     

Log in to post a comment.