btBvhTriangleMeshShape collision problem

r_bewick
Posts: 8
Joined: Sat Nov 13, 2010 2:58 am

btBvhTriangleMeshShape collision problem

Post by r_bewick »

Hi, I am creating a racing game which has a track made out of btBvhTriangleMeshShape pieces, such as straights and corners like in trackmania. I load the vertices for the pieces from meshes I have created.

My car drives fine over the straight pieces of road, but on the corners, it seems to hit bumps when my car is travelling fast, like the vertex normals of the btBvhTriangleMeshShape are not the same as the normals of the mesh or something.
Can someone help me with this?
thanks,
r_bewick
pico
Posts: 229
Joined: Sun Sep 30, 2007 7:58 am

Re: btBvhTriangleMeshShape collision problem

Post by pico »

r_bewick wrote:Hi, I am creating a racing game which has a track made out of btBvhTriangleMeshShape pieces, such as straights and corners like in trackmania. I load the vertices for the pieces from meshes I have created.

My car drives fine over the straight pieces of road, but on the corners, it seems to hit bumps when my car is travelling fast, like the vertex normals of the btBvhTriangleMeshShape are not the same as the normals of the mesh or something.
Can someone help me with this?
thanks,
r_bewick
Hi,

do you use the bullet vehicle or a bullet character controller for the car?
r_bewick
Posts: 8
Joined: Sat Nov 13, 2010 2:58 am

Re: btBvhTriangleMeshShape collision problem

Post by r_bewick »

Thanks for the reply, pico.
I use the vehicle from the bullet vehicle example.
Thanks,
r_bewick
r_bewick
Posts: 8
Joined: Sat Nov 13, 2010 2:58 am

Re: btBvhTriangleMeshShape collision problem

Post by r_bewick »

anyone?
pico
Posts: 229
Joined: Sun Sep 30, 2007 7:58 am

Re: btBvhTriangleMeshShape collision problem

Post by pico »

Hi, sorry for the delay.

There are problems with wrong normals at the edges of a mesh. Please look here for a solution:

http://www.bulletphysics.org/Bullet/php ... dgeInfo%23
r_bewick
Posts: 8
Joined: Sat Nov 13, 2010 2:58 am

Re: btBvhTriangleMeshShape collision problem

Post by r_bewick »

Thanks pico.