Collision Plane / Mesh help

bonjovi
Posts: 35
Joined: Mon Jul 20, 2009 12:58 pm

Collision Plane / Mesh help

Post by bonjovi »

Hi

Since few days there is no collision between simple meshes and plane (static plane). I know the problem is inside my code because all worked fine few days ago and i did not updated bullet... My meshes collide fine with a box for exemple, but the plane. It is very curious because the box/plane is OK ...

Look at the picture below:
-> red mesh is dynamic : fall under the plane ground (!OK)
-> blue mesh is dynamic, blue box is dynamic : the boths fall on the ground and stay here (OK)
-> if i remove the blue box, the blue mesh falls under the ground (!OK).

I did not use any collide bits or exclusions ....

An additionnal information : trimesh/trimesh don't works too ...

I know the problem is on my side, so does the developper can give me some 'check points' in the Bullet's code to determine what happens ?

Thank you for your help.
You do not have the required permissions to view the files attached to this post.
bonjovi
Posts: 35
Joined: Mon Jul 20, 2009 12:58 pm

Re: Collision Plane / Mesh help

Post by bonjovi »

An other indication if some one can help me ... :

By overriding the nearcallback function using m_dispatcher->setNearCallback(customNearCallback);

Code: Select all

collisionPair.m_algorithm->processCollision(colObj0,colObj1,dispatchInfo,&contactPointResult);
btPersistentManifold* m_manifoldPtr=contactPointResult.getPersistentManifold();

_cprintf("\tDISPATCH_DISCRETE PersistantManifold=%p\r\n",m_manifoldPtr);
if( (m_manifoldPtr) && (m_manifoldPtr->getNumContacts()!=0))
...

The near callback is well called but manifoldPtr is always NULL in return from getPersistentManifold() !!
Then, there is no collision from plane/mesh or mesh/mesh

any idea ?

Thank youuuuuuuuu
edouard
Posts: 8
Joined: Fri Sep 25, 2009 2:08 pm

Re: Collision Plane / Mesh help

Post by edouard »

Hi,

it's probably a problem related to your collision flags. How did you set them?

Edouard
bonjovi
Posts: 35
Joined: Mon Jul 20, 2009 12:58 pm

Re: Collision Plane / Mesh help

Post by bonjovi »

In fact the big problem was the used primitive. By using a GImpactMesh collshape : it works better, but with the plane ...
I don't understand why it not collides with the static plane ...

The collides bits are as default (i don't have changed them)
bonjovi
Posts: 35
Joined: Mon Jul 20, 2009 12:58 pm

Re: Collision Plane / Mesh help

Post by bonjovi »

The solution : btGImpactCollisionAlgorithm::registerAlgorithm(m_dispatcher);

Pfffffouuuuuu :)