What am I doing wrong here?

Topics: User Forum
Apr 26, 2012 at 11:31 PM

Hi,

I have just started to port a load of projects from FPE2.x to FPE 3.3.1 and i am having some problems with all my physics.

This is a sample of what i am doing which demonstrates my problem

http://pastebin.com/wNfPhJUT

Cheers

Apr 27, 2012 at 5:44 AM
Edited Apr 27, 2012 at 5:48 AM

I don't know specifically what the problem is so a screenshot or specifics might help however a quick glance of the code tells me you might want to be using smaller units when talking to Farseer. Your rectangles are hundreds of metres in size and the engine works better with units specified between 0.1 and 10. Try replacing all your calls to generating your bodies with ConvertUnits.ToSimUnits(n) (you can find the ConvertUnits class in the samples project.