Where could I learn how to make a real-time physics engine with 2d or 3d rigid body dynamics and constraints? Something like box2d, bullet etc. I basically want to make a physics engine for a kart racing game.
This is a solved problem for many use cases. I'm not sure of any tutorials on this specific subject that are available in Google. You can try studying the implementation; of these projects.