trouble using bullets for collision only

kaolite
Posts: 13
Joined: Sat Dec 13, 2008 5:05 pm

trouble using bullets for collision only

Post by kaolite »

Hi,

I have a 2D world ( a grid of for exemple 10x10 2D box), and i wants to know when one box (centered around my mouse position) intersects with items of the grid.
I wants to use bullet physics, because I wants after that change the simple box around the mouse to a more complex shape. I don't wants to use dynamic world, avoid callback...

I have read the tutorial http://www.bulletphysics.com/mediawiki- ... d_Triggers and check appcollisioninterfacedemo.
The collision detection works except that it detect always collision around the true position that are not colliding... even if I reduce the size of the box around the mouse position ( I have tryed to reduce the margins ... but with no change...)

1)- I use a large size world (It's in pixel screen resolution ... for exemple the mouse size is around 5x5 and each tile 200x200 ) Could it be a problem ?
2)- is It a problem if the mouse shape is inside a 2D box (without contact phase) ?
3)- what can I do ?

Best regards,

Kao
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: trouble using bullets for collision only

Post by Erwin Coumans »

Could you replicate the failing collision test in one of the Bullet demos, and attached the zipped demo?

Thanks,
Erwin
kaolite
Posts: 13
Joined: Sat Dec 13, 2008 5:05 pm

Re: trouble using bullets for collision only

Post by kaolite »

Hello,

first thanks for your help ... But it's fixed now ... it was not working only because I haven't seen that I have to set the half of the shape box ...

sorry :)