Documentation Problem/Error

Topics: Developer Forum, User Forum
Apr 30, 2011 at 5:42 PM
Edited Apr 30, 2011 at 6:00 PM


I'm trying to do this, taken straight from the documentation:

Fixture fixture = FixtureFactory.CreateCircle(_world, 0.5f, 5, new Vector2(10, 0));

It doesn't work. It throws an error: Error 1 'FarseerPhysics.Factories.FixtureFactory' does not contain a definition for 'CreateCircle'  

I understand the error, fixturefactory has no methods for "CreateCircle", but how am I supposed to do what the documentation says you can do?

What am I missing?

Apr 30, 2011 at 9:29 PM
Edited Apr 30, 2011 at 9:36 PM

I think the documention tab on this page is outdated.  With the latest release (which didn't come out too long ago) they readjusted some things.

To create a circular fixture you can do it a couple ways, but you will need a Body object in both casses.


This will create a body and a circular fixture in one command.

Body body = BodyFactory.CreateCircle(_w, 0.5f, 5, new Vector2(10,0));


An alternative is to just create a generic body and then use the FixtureFactory's attachCircle method to add a circle. I'd just use the first approach if you're learning the engine.

Jul 26, 2011 at 3:07 PM

Thanks Jerkald, good to know!  Hope someone can update the document soon.