I'm the beginner of Bullet. In my work, I want to get the friction force between the bodies' interaction. I noticed that m_appliedImpulseLateral1 and m_appliedImpulseLateral2 in btManifoldPoint Class maybe the friction impulse during the contact procress. So I calculated the friction force as follow:
int numManifolds = dispatcher->getNumManifolds();
for (int i=0; i<numManifolds; i++)
btPersistentManifold* manifold = dispatcher->getManifoldByIndexInternal(i);
for(int p=0; p<manifold->getNumContacts(); p++)
std::cout<<"total fric1 force="<<totalFric1/dt<<std::endl;
std::cout<<"total fric2 force="<<totalFric2/dt<<std::endl;
However, total fric2 is always equal 0 and toal fric1 is not equal to the solution which is simply calculated by friction coefficient times normal force.
I'm confused about it for a couple of days. Any problem about my code? How to get the exact friction force in Bullet?
Thanks for your reply!
1 post • Page 1 of 1