convexSweepTest and ClosestConvexResultCallback normals

Post Reply
Pilo
Posts: 5
Joined: Sat Jan 10, 2009 11:10 am

convexSweepTest and ClosestConvexResultCallback normals

Post by Pilo »

Hi!

I have a question about the normal returned by convexSweepTest, have searched in the forum and didn't found the answer.
I'm trying to implement a character controller like the one used in quake3 (sweep the player collision against the wall, clip the velocity, etc).

But it seems to me that when I sweep a capsule, the normals return by convexSweepTest are not the normals used by the triangles in the tri mesh : for example if my mesh only has triangles with (0, 1, 0), (1, 0, 0) and (0, 0, 1) normals, sometimes ClosestConvexResultCallback normals can be something different. I think it's an issue when colliding with an edge.
Using a cylinder gives better result (and maybe I will stick to this).

So what are the normals returned by convexSweepTest when casting against a trimesh? or boxes? Is there a difference whith triangle edges?

Thank you!

Pilo.
user64
Posts: 14
Joined: Fri Jan 28, 2011 9:03 pm

Re: convexSweepTest and ClosestConvexResultCallback normals

Post by user64 »

cylinder/capsule for humanoid character is better choice!
it seems like convexSweepTest() returns strange result for edge case.
in my practice convexSweepTest ( only btCylinderShapeZ vs. btBvhTriangleMeshShape ) returns fine results.
Post Reply