I'm currently developing a game with Irrlicht and my own wrapper for bullet physics.
I'm really pleased to use this great physics engine, except that i had a problem when using fast moving object.
I need to shoot a really fast object through the level (a little cube), but even after setting the proper CCD values, the object still tunneling some objects.
It seems that the object pass through only certain object (Trimeshes), but i cannot see the relationship in this problem.
I also tried to put a very little value to the CCD threshold, but nothing changed.
This is the code:
Code: Select all
ISceneNode * node = smgr->addCubeSceneNode(10,0,-1,smgr->getActiveCamera()->getPosition());
body = bulletmgr->addRigidBox(node,40); //This line will create the box shape, motion state, transform, ...
body->getBodyPtr()->setCcdMotionThreshold(0.5f);
body->getBodyPtr()->setCcdSweptSphereRadius(0.5f);Thank you very much