I created a simple custom constraint using the Construction Kit. Here is the code.
kit.setPivotsHelper(pBodyA, pBodyB, hkPivotW);
A is a Keyframed object in my level, while B is a Dynamic cube. All objects in my test case have a mass of 1.
The basic behavior of the constraint is that B is free to translate but its frame is constrained to always match the frame of A.
In my test situation B is resting on a plane and A is given a rotational velocity of 0.1 along its X axis. B then starts to rotate in synch and therefore rolls forward on the ground.
I am observing 2 bugs:
1: Even if B is given a friction value of zero it still travels on the ground. The motion is slightly slower than with full friction but not by a very noticeable amount. In theory a friction of zero should keep the center of mass of B in a constant position horizontally. Is there something I can do to ensure that objects with zero friction values do not receive any tangeantial forces during contacts?
2: Way more problematic, if B bumps on another Dynamic cube (mass 1) while rolling, it stops rotating and the constrained Keyframed object stops rotating as well! Stepping through shows that both A and B have been deactivated. Am I wrong in assuming that nothing in the simulation should ever be able to modify the linear or rotational velocity of a Keyframed object? Without the full source I cannot tell if A stops rotating because it gets deactivated or if it gets deactivated because it stopped rotating. This behavior only happens at low rotational speeds.