i don't find a concrete answer in this forum, so i ask my question here.
I have a sphere and a shape body. only the sphere is dynamic (i.e. mass !=0)
i initialize my physic word with :
myCollisionConfiguration = new btDefaultCollisionConfiguration();
myDispatcher = new btCollisionDispatcher(myCollisionConfiguration);
myBroadphase = new btDbvtBroadphase();
mySequentialImpulseConstraintSolver = new btSequentialImpulseConstraintSolver();
myWorld = new btDiscreteDynamicsWorld(myDispatcher,myBroadphase,mySequentialImpulseConstraintSolver,myCollisionConfiguration);
myWorld->getSolverInfo().m_splitImpulse = true;
myWorld->setGravity( btVector3(0.0,0.0,0.0) );
and initialize my object with :
shape = new btSphereShape(btVector3(m_size.x,m_size.y,m_size.z).length()/3.0);
shape = new btBoxShape(btVector3(m_size.x,m_size.y,m_size.z));
//get the intial position of the object
FCgetPosition f; /* ... */
m_transform.setOrigin( btVector3(f.position.x,f.position.y,f.position.z) );
//On calcule l'inertie suivant le poids.
shape->calculateLocalInertia( m_mass, localInertia );
m_motionState = new btDefaultMotionState(m_transform);
btRigidBody::btRigidBodyConstructionInfo myBoxRigidBodyConstructionInfo( m_mass, m_motionState, shape, localInertia );
m_body = new btRigidBody(myBoxRigidBodyConstructionInfo);
//reference to the physic bullet world
my scene is one ball in center of 4 box which build borders like in a pool.
My problem is when ball collide with borders : the ball stick on the box. I don't success to adjust the collision to have a "classic" bounce, like in pool but with a total restitution of the velocity after the collision
I follow many pist :
* the margin of the body ( if too higher, the ball go through the border)
* to add "myWorld->getSolverInfo().m_splitImpulse = true;" : nothing change
* adjust contact threshold : nothing change
* i read somewhere to switch continous detection to off, but i've don't find something like that in the API
If someone has some advices or ways of reflexion,
feel free to share it.
Thanks in advance
PS : sorry for my english