Gravity center of a shape

craymond
Posts: 1
Joined: Tue Mar 03, 2009 2:06 pm

Gravity center of a shape

Post by craymond »

Hi,
I lead off Bullet,
and I would like to know how to get the gravity center of a shape.
Is there a dedicated method in any classes, or have I to calculate it on my own ?

Thanks
h4tt3n
Posts: 25
Joined: Wed Mar 12, 2008 9:08 am

Re: Gravity center of a shape

Post by h4tt3n »

Hi there,

If you want to find the gravitational centre of a polygon, ie. NOT the center of gravity of a set of particles, google "centroid". There's a simple, cpu cheap algorithm out there, just used it myself.

Cheers,
Mike