convexSweepTest() problem with static concave shapes

Verbo
Posts: 39
Joined: Fri May 08, 2009 9:27 pm

convexSweepTest() problem with static concave shapes

Post by Verbo »

Hi,

My implementation of convex cast wheels is progressing, but I now have big problems with the result of convexSweepTest() for static grounds that are made of btBvhTriangleMeshShape. With fixed convex shape (bounding box, or plane), the convex sweep detect the ground correctly, but when the ground is made of concave shape, the convex sweep has a lot of misses. It seems to detect the floor randomly. At first I thought that my destination transform was not low enough, but that's not the problem. I really don't understand, because when I debug draw the ground concave shapes, they all looks good (I know it is not a strong argument...but just in case).

As a second problem, I also noticed that the convexSweepTest() doesn't detect anything at all when I tried use a btCompoundShape for that casting shape (a torus made of multiple spheres for each of my wheels). But normally I use a real torus for my wheels, and I still get the first problem I was mentionning in the precedent paragraph.

Is there an issue or a trick that I should know of with the convexSweeptest() when dealing with concave shapes or is this sweep test only able to sweep through the other convex shape of the world?

Thanks.

A bit despaired Verbo :|
Verbo
Posts: 39
Joined: Fri May 08, 2009 9:27 pm

Re: convexSweepTest() problem with static concave shapes

Post by Verbo »

Hi again,

Ok, after some research on old threads on the forums, I found a solution to my problem. I had to set the margin of my bvh triangle shapes to a very slight value of 0.015 to make the convex sweep work again. Visually, it is not noticeable at all. So unless there is another solution that doesn`t involve margin modification, it should be good for now.

See ya!

Verbo
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: convexSweepTest() problem with static concave shapes

Post by sparkprime »

May be related to this: http://www.bulletphysics.com/Bullet/php ... ithm#p9837

I was using btBVHTriangleMesh at the time.