Multiple Polygons Geoms for one Body

Topics: User Forum
May 29, 2009 at 1:32 PM


In my game, I would like to associate multiple polygons geoms with one body in order to create compound objects. My only problem is on how to compute the moment of inertia because in BodyFactory.CreatePolygonGeom it is computed for only one set of vertices. How do you compute for multiple sets of vertices? Thanks.

Remi Gillig.

May 30, 2009 at 12:35 PM

Maybe my question was dumb, I don't know but I only need to know how to compute the moment of inertia of a body with multiple geoms (polygons for example).



Remi Gillig.

May 30, 2009 at 1:50 PM

Well when I started writing a method to group/unproup geoms I simply added the MOI's together and that seemed to work quite well. I'm not sure if that is the correct way though.

May 30, 2009 at 2:15 PM

OK thanks, I was going to do that at some point.

By the way, I am currently using Farseer Physics in a game project which includes some fluids physics, maybe some parts of my work could be useful in a future version of Farseer. I'll let you know when it's finished (end of June).

Remi Gillig.

May 30, 2009 at 2:23 PM

That would be great can wait to see it.