btBvhTriangleMeshShape bug?

Post Reply
User avatar
kenshin
Posts: 36
Joined: Fri Oct 31, 2008 5:10 pm
Contact:

btBvhTriangleMeshShape bug?

Post by kenshin »

My scene must use btBvhTriangleMeshShape,It has this problem which can not be avoided.

I use the VehicleRaycast,the car travel on the btBvhTriangleMeshSHape ,even flat ground,
the car still like hit something.

I have try to detailing the scene's mesh triangle (one triangle separate into three)
but still useless.

is it a bug in btBvhTriangleMeshShape?

can anybody help?

thanks,Kenshin
Last edited by kenshin on Fri Jul 24, 2009 6:11 pm, edited 1 time in total.
User avatar
kenshin
Posts: 36
Joined: Fri Oct 31, 2008 5:10 pm
Contact:

Re: btBvhTriangleMeshShape bug?

Post by kenshin »

when my vehicle travel on btStaticPlaneShape
everything is Ok。
User avatar
projectileman
Posts: 109
Joined: Thu Dec 14, 2006 4:27 pm
Location: Colombia
Contact:

Re: btBvhTriangleMeshShape bug?

Post by projectileman »

What if it is caused by Quantization?

Just for trying, use a btGImpactMeshShape which has the same functionality as btBvhTriangleMeshShape. But also you have to make some setting before using it:
The initialization of a Gimpact mesh is the same as a btBvhTriangleMeshShape object. Just pass the Mesh interface to its constructor when create one. Also check if the Gimpact algorithm is registered when initializes Bullet .

Code: Select all

btCollisionDispatcher * dispatcher = static_cast<btCollisionDispatcher *>(m_dynamicsWorld ->getDispatcher());
btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher);
User avatar
kenshin
Posts: 36
Joined: Fri Oct 31, 2008 5:10 pm
Contact:

Re: btBvhTriangleMeshShape bug?

Post by kenshin »

Thank you ! projectileman .
I will have a try.talk to you later
User avatar
kenshin
Posts: 36
Joined: Fri Oct 31, 2008 5:10 pm
Contact:

Re: btBvhTriangleMeshShape bug?

Post by kenshin »

hi,projectileman
As you said I have done。
but there is a big problem that my all Scene Shape all gone。

this is my bullet initial code:

Code: Select all

void MyPhysicsSystem::BeginWorld()
{

	mDispatcher = new btCollisionDispatcher(&mDefaultCollisionConfiguration);
	mBroadphase = new btAxisSweep3(::btVector3 (-1000,-1000,-1000),::btVector3(1000,1000,1000));
	mSolver =new btSequentialImpulseConstraintSolver();
	mWorld =new btDiscreteDynamicsWorld(mDispatcher,mBroadphase,mSolver,&mDefaultCollisionConfiguration);
	mWorld->setGravity(btVector3(0.0f,-10.f,0.0f));
	
	btCollisionDispatcher * dispatcher = static_cast<btCollisionDispatcher *>(mWorld ->getDispatcher());
	btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher);
}
when I first complete the input of code
the Compiler prompt that can't find the btGImpactCollisionAlgorithm.h
User avatar
kenshin
Posts: 36
Joined: Fri Oct 31, 2008 5:10 pm
Contact:

Re: btBvhTriangleMeshShape bug?

Post by kenshin »

and I have another question that what is the Gimpact ,I search for user manual for some information ,but it seems dosen't have one。
User avatar
kenshin
Posts: 36
Joined: Fri Oct 31, 2008 5:10 pm
Contact:

Re: btBvhTriangleMeshShape bug?

Post by kenshin »

this is the pic of my game
car travel on plane terrain but suddenly rolls over。
Image
Post Reply