I am running into some puzzling behavior, where a slowly spinning box appears to pause after completing a full rotation. It seems the rotation is still simulated correctly, resulting in a constantly varying global pose PxTransform obtained for the shape. However, the angle of rotation obtained from the q member of this transform, remains at a constant value of 3.14… when the box is on its second rotation. To reproduce:
aBoxActor.setAngularVelocity(PxVec3(0,0,1)); // assume aBoxActor previously created with a single box shape
PxTransform pose = aBoxActor.getGlobalPose();
PxQuat Q=pose.q;
PxReal angle;
PxVec3 axis;
Q.toRadiansAndUnitAxis(angle,axis);
Set a breakpoint after the last line. The angle variable will correctly change at about one radian-per-second, for a while, then remain fixed for a same amount of time, then repeat this behavior periodically.
Am I using this feature incorrectly or is this a bug? The reason I need the angle/axis representation is that this is the most convenient way to transform the Modelview matrix in OpenGL.
Thanks,
-nuun