cannot get a lateral impulse

ins7itia
Posts: 5
Joined: Wed Feb 01, 2012 5:37 am

cannot get a lateral impulse

Post by ins7itia »

Hi. I'm testing some collision objects using Bullet, and there's a problem I can't get now.

I want to know about the contact force applied on the rigid body.


Found btManifoldPoint has m_appliedImpulse, so I can get the applied Impulse on the normal contact direction of two rigid bodies.
The friction direction is also working, so I can't get which way the friction applies.

But strangely, m_appliedImpulseLateral1 (I guess this is a lateral impulse, though I don't know what the '1' or '2' means - is it redundant information?) is always 0.
Is this obsoleted variable? Or did I missed something to get this value?

Any comments would be appreciated :D
ins7itia
Posts: 5
Joined: Wed Feb 01, 2012 5:37 am

Re: cannot get a lateral impulse

Post by ins7itia »

With several tests, I found to get a lateral impulse data.

All I need to do is adding flags into btContactSolverInfo.h:

SOLVER_USE_FRICTION_WARMSTARTING
SOLVER_USE_2_FRICTION_DIRECTIONS

Second flag is for preventing crash due to the array size.
Still, I'm not sure what these 2 direction means.. is there anybody know this?