How to get the 'center of mass' of a mesh

i want to find the center of mass of an object like one of these:

I would imagine it would be one of these points:

is there a method on finding this point using just vectors?
Im essentially trying to find the center of the shape, not the bounding box. Is that possible?

My expectation for center of mass is somewhat different:

2 Likes

Okay, im not sure, but what in trying to get is the center if that face. I need the point to be on the actual object, not outside.

I think you’re looking for the Centroid, if you’re dealing with a single geometry you can center it with geometry.center , if you have multiple objects you can use Box3.getCenter to get the center point.

I’m afraid I cannot assist any more, as I cannot understand what do you mean by “center”. Most likely you have to define it formally, and then it will be possible for you to make it in code.

Just curious, what face would be the center of a RingGeometry mesh?

1 Like