Center Of Mass Rigid Body

Does anyone know how to calculate the center of mass of a given rigid body. I need the center of mass for collision detection. I have a set of rigid bodies with the same vertices in body space but change in world space.

Most physics engine APIs have methods for this kind of thing. Which one are you using?

Am trying to do it on my own, am not using any engine. Just a vector and matrix class with OpenGL

OpenGL isn’t going to help you with this task. It’s between you and your representation of a model.…rtich96fast.pdf

I had a quick look through the reference paper given above. All I can say is “good luck with that”.
If you can make head or tail from that lot figuring out how to make an OpenGl engine must be trivial :wink:

You could look at an implementation directly: