PhysicsSimulationView Help

Topics: Developer Forum
Nov 29, 2009 at 11:48 PM
Edited Nov 30, 2009 at 3:26 AM

I have been trying to display the PhysicsSimulationView in my game and i can't seem to get it right. I have tried making references for DemoBaseXNA and FarseerGames, placing the fonts folder in the content of my project, but when l run it, in the PhysicsSimulationView.cs class pointing the method "_spriteFont = content.Load<SpriteFont>(@"Content\Fonts\diagnosticFont")"; an error appears saying "Error loading "Content\Fonts\diagnosticFont". File not found." I have also tried puting the DemoBaseXNA and FarseerPhysicsXNA solutions, in my project, and also tried puting the PhysicsSimulationView.cs class in my project's solution, when i do this i can't even create PhysicsSimulationView objects. As my last try i used a .dll found in here: http://farseerphysics.codeplex.com/Thread/View.aspx?ThreadId=72328, I press run and a white window appears, and when i think it's finally working an error spawns in the  PhysicsSimulationView.Draw(spriteBatch) method, again, saying "Field not found: 'FarseerGames.FarseerPhysics.Collisions.Geom.AABB'." I don't know if it is a problem with the Debugg.dll file.

I really need this feature to check some polygonal bodies, but i can't implement it in my game. Help deeply appreciated.

Coordinator
Nov 30, 2009 at 11:24 AM

You can fetch a patch here (by bassman) that might help your.

Nov 30, 2009 at 5:17 PM

Great, thank you very much, that worked, and it's a nice patch to keep everything organized. I just changed the Content.RootDirectory = "Content"; in game1 constructor to  Content = new ContentManager(Services); and passed this new Content; as argument to the PhysicsSimulationView.Load(GraphicsDevice, Content) like this, and to load textures i just changed, instead of giving the filename alone, i wrote @"Content/map" for example. Just posting this explanation for anyone having the same problem as me.

Thanks again, wonderful engine, nice feedback, congratulations.