1
\$\begingroup\$

Im using Farseer Physics with Xna 4.0. Im following a starter guide. It said that to draw, I need to convert the meters to pixels with the ConvertUnits namespace. I looked through all of the engine, but I cant find the ConvertUnits class. Im basicly stuck without it. Where is it stored, or do I need another resource?

\$\endgroup\$
3
\$\begingroup\$

Starting with 3.x, FPE(Farseer Physics Engine) now uses the MKS (Meter-Kilogram-Second) system of units.

The ConvertUnits class can be found under Farseer Physics Engine 3.3.1 Samples XNA\Samples XNA\Samples XNA\ScreenSystem. ConvertUnits is a helper class that lets us switch between display units (pixels) and simulation units (MKS) easily.

This file can be downloaded here: http://farseerphysics.codeplex.com/releases/view/64108

Original Post at: http://farseerphysics.codeplex.com/discussions/247635

So you basically need to add the ConverUnits.cs file to your project, and you should be able to convert meters to pixels just fine :)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.