My contactAddedCallback looks like this:
Code: Select all
CollisionObjectBullet* obj0 = (CollisionObjectBullet*)colObj0Wrap->m_collisionObject->getUserPointer();
if(obj0->is_static()) {
cp.m_contactPointFlags |= BT_CONTACT_FLAG_LATERAL_FRICTION_INITIALIZED;
cp.m_lateralFrictionDir1.setValue(0.0, 0.0, -1.0);
cp.m_lateralFrictionDir1.normalize();
cp.m_lateralFrictionDir2.setValue(1.0, 0.0, 0.0);
cp.m_contactMotion1 = 1.0f;
}
The issue is that there seems to be no friction along m_laterialDrictionDir2, as my rigid body with an initial velocity of (1, 0, 0) just keeps sliding along the x-axis when it touches the ground, though it does start moving along the z-axis as well - as expected.
Like I said I use Godot, but I have addded some slight modifications to the source code. If anyone wants to try this out for themselves I can send the Godot scene file and list my (very few) changes.
Does anyone have any idea why there is no friction?