Best way to have many Bullets collide with moving meshes

genesys
Posts: 8
Joined: Sat Jan 30, 2010 3:03 pm

Best way to have many Bullets collide with moving meshes

Post by genesys »

Hi!

I'm working on an iPhone game and i'd like to use Bullet's collision detection only (no physics).

i have arround 100 bullets simultaniously on sreen, they don't have a volume (just 3d points) and move at constant speed. I want those bullets to collide with moving 3d meshes (the 3d meshes don't deform, just theyt transformation matrix changes). The bullets can't collide with each other, nor can the 3d meshes

what's the best way to do this kind of collision detetion using bullet?

thanks!
pico
Posts: 229
Joined: Sun Sep 30, 2007 7:58 am

Re: Best way to have many Bullets collide with moving meshes

Post by pico »

Hi,

i had a similiar situation (physics for particles).

What i did was to setup kinematic spheres primitives for the 'bullets'.
As an additional performance boost i didn't updated the spheres every frame but only each 2th or 4th.
That worked pretty well for hundreds of Particles. Make sure you setup the collision ids right.
For me 'btDbvtBroadphase' worked best.

Also be sure to set "bltWorld->setForceUpdateAllAabbs(false);". Its on by default for backward compatibility

regards