Offset Geom Diagnostics

Topics: Developer Forum, User Forum
Mar 15, 2010 at 8:45 AM

Hi all,

Im currently using a camera to offset the position I draw my Bodies. Problem is though, is that when I want to use the Diagnostics to see the Geoms shapes and positions, they aren't there as they are still in the physical location but I'm drawing my bodies in the relative screen position. Is there a way that I can offset the Diagnostics for the Geom outlines?


Thanks in advance!

Mar 16, 2010 at 6:53 PM

I was about to make a new thread to ask something very similar.

I'm trying to be able to "trade" bodies out but keep the same geom, but since the bodies are different,

I'd also like to offset the geom to the correct position. It appears that the only time you can offset a geom

is in the Geom's creation using GeomFactory.

I've tried to use LocalVertices.Translate, and that appears to work somewhat, but does not do what is expected.

The geom's Position property does not follow the new vertices location.

So, I'm wondering, is there not a way to shift a geom's position in relation to a body after it has been


Mar 16, 2010 at 7:56 PM

After my last post, I went into the Libraries and discovered that all you have to do is

access the variable "_positionOffset." I added a method "SetOffset" to Geom.cs, and

that worked just fine.


There are actually several things my studio would like to do to perhaps optimize the

engine, but we are waiting until Farseer Physics 3.0 to come out before we touch it,

at least that's the plan as of now.