Sphere-Cone collision/contact bug?

Antodologo
Posts: 21
Joined: Sat Feb 06, 2010 3:40 am

Sphere-Cone collision/contact bug?

Post by Antodologo »

Hi!

In the last few months I have observed a strange behaviour when my projectiles (that are cones (btConeShapeZ) ) collide with spheres. It worked perfectly before but it broke somewhere along the way. I am using revision 2410 currently.

Today I tried different things and I have seen that my cones are "colliding" not with the sphere, but with the axis aligned bounding box of the sphere. Or at least the contact between the sphere and the cone is generated somehow, because the projectile goes through the bounding box as if there were no physical interaction, but the contact is generated as if the sphere were touched by the projectile (and that didn't happen).

I thought it was my fault but it doesn't happen if I use boxes, spheres or cilinders instead of the sphere or the cone. Even more, if I use a multisphere with one sphere instead of the original sphere, everything is fine. So it seems to be just a problem with collisions between spheres and cones or, maybe, contact generation between spheres and cones.

I haven't looked the code in Bullet as I don't know where to start. Any ideas?

Thank you all in advance ;)
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Sphere-Cone collision/contact bug?

Post by Erwin Coumans »

Can you re-create this in any of the Bullet demos?

Thanks!
Erwin
Antodologo
Posts: 21
Joined: Sat Feb 06, 2010 3:40 am

Re: Sphere-Cone collision/contact bug?

Post by Antodologo »

Hard to say. I haven't found a demo with everything I need, but I can try to make my own demo. If I have some time I will try and post it here.
Antodologo
Posts: 21
Joined: Sat Feb 06, 2010 3:40 am

Re: Sphere-Cone collision/contact bug?

Post by Antodologo »

Ok, I think I have a modified demo to show the problem.

I used CollisionInterfaceDemo, that is not the way I process contacts but the bug seems to happen in the same way. Just use that file instead of the original one and look at the cone generating a contact when entering the hand drawn bounding box when there is no real collision between cone and sphere.

If you use a sphere or a box with similar scales the contact is never generated, you can try it easily now.

Maybe the demo is wrong, but there are not many changes to check. Just tell me whatever you think about it.

Thank you for you interest and your time ;)
You do not have the required permissions to view the files attached to this post.
kesten
Posts: 1
Joined: Thu Aug 25, 2011 5:52 am

Re: Sphere-Cone collision/contact bug?

Post by kesten »

I'm having troubles just getting my bounding box (cone) to align with my mesh.
I found an old thread on blenderartist.org and posted the problem there
http://blenderartists.org/forum/showthr ... unding+box

As soon as i manage to get a build going i'll try and tackle this one. I'll have a look at the collision detection files to see what's up with the physics debugger and the cone-sphere collision.

kesten
Antodologo
Posts: 21
Joined: Sat Feb 06, 2010 3:40 am

Re: Sphere-Cone collision/contact bug?

Post by Antodologo »

Can someone at least confirm it is a bug? There is something wrong with my demo?

Thx