In terms of rotating the Inertia matrix look at the last answer. He even explains why it makes sense in terms of angular momentum. And obviously it started working more stable right after I implemented that way of rotating the inertiavalues.
Your reply reminds me that i really should develop more debugging systems for the renderer!
BadProgrammingGuide said: Your reply reminds me that i really should develop more debugging systems for the renderer!
Oh yes. It took me many years to overcome the laziness of rendering box diagonals, and instead rendering proper boxes made from 12 lines. But oh, it was worth it. :D Would surely help you here. I would also visualize contact points, contact force magnitudes or impulses, etc.
Still, my own adventure on making a physics engine was not really successful. But the gained experience helped to become a good user of a physics engine at least. Today i work on self balancing ragdolls, so control problems rather than simulation basics. And here i spend a lot of time on visualizations, which is really helpful, even if it looks confusing to anybody else:
That's an inverted pendulum, swinging left and right. The function plots show me both the predicted future and the measured past. This way i can really see how the small simulation error affects results over time, which would be hard to figure out otherwise. It takes some time to build up those visuals, but in my experience it's always worth it.
BadProgrammingGuide said: has the multiplication order different, although does it matter?
I looked at my physics code and I do have R*(I*R^T), where R is the local to world rotation. The order depends on whether you are going from local to world or world to local.