I'm working on a platformer type of game with level build as a compound collision (currently 20-50 boxes). I have been trying to switch my character controller to find the ground using convex cast instead of ray cast, but the cast returns unexpected contacts.
After days of debugging I finally got the problem narrowed down to compound collisions. Everything works as expected, when the level consists of only one box (created using NewtonCreateBox()). If a add another box (resulting in a compound collision for the level body) the convex cast starts returning contacts with normals pointing in opposite direction and contact points nowhere near the ground. The casted collision is a sphere (ellipsoid).
Ray casts work as expected with the exact same level geometry.
Any help will be appreciated as I'm running out of ideas..