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\$
0

1 Answer 1

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\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .