This project has moved. For the latest updates, please go here.

Circular Border in farseer 3.2

Topics: User Forum
Feb 22, 2011 at 9:45 PM

I'm sorry for my English

 I have the same problem as the guy there 

That solution don't work in 3.2 version (There is no GeomFactory.cs and maybe something else). Please help to make a circular border in 3.2 version.

Feb 22, 2011 at 9:56 PM

Take a look at the loop shape. You'll find code to produce a circle in the DebugView method for rendering circle shapes. Use that to generate vertices for a circle and create a loop shape from that.

Feb 7, 2012 at 6:37 AM
Edited Feb 7, 2012 at 6:40 AM

I had the same issue. Here's what I did to create circular border for our game. I adapted what that guy did in his post to 3.2.

Apparently the Code snippet block is broken in Chrome?

To create a loop shape do:

int SizeOfBounds = 5000; // In pixels          
Vertices verts = Boundaries.CreateConcaveSemiCircle(ConvertUnits.ToSimUnits(SizeOfBounds), SizeOfSystem/20);
Body border = BodyFactory.CreateLoopShape(, verts, Vector2.Zero);