For 3D physics simulation you can take a look at Bullet (https://t.co/qtxbgqNsPB), which has been used on many commercial games including the Trials series.