So I've spent some time today try to figure out why cars are still flying off in random directions when hitting curbs sometimes.
It turns out it is a bug in Bullet, to be more specific in the SIMD_DEGS_PER_RAD macro.
Code:
#define SIMD_PI btScalar(3.1415926535897932384626433832795029)
#define SIMD_2_PI btScalar(2.0) * SIMD_PI
#define SIMD_HALF_PI (SIMD_PI * btScalar(0.5))
#define SIMD_RADS_PER_DEG (SIMD_2_PI / btScalar(360.0))
#define SIMD_DEGS_PER_RAD (btScalar(360.0) / SIMD_2_PI)
The first one to spot it gets a virtual cookie.
PS:
What is affected by this bug? Tire forces (cars flying off randomly and stuff) and AI steering calculations.