reactphysics3d
reactphysics3d copied to clipboard
Change of angular velocity integration method.
Angular velocity should be computed in the rotated coordinate system to get the proper value of the angular momentum derivative: https://en.wikipedia.org/wiki/Euler%27s_equation_of_motion
The provided code change switches angular velocity integration to the local (rotating) coordinate system.
A unit test is added. In the absence of external torque (caused by gravity or contact), the angular momentum vector should remain constant. The included unit test verifies this property.